Welcome Guest Login Register Member List
ExpressionEngine Forums
Advanced Search
Username: Password:
Remember Me? forgot password?
You are here: Forum Home  >  Usage  >  Tips and Tricks  >  Thread
   
 
Migrating from 1.6 to 1.7
 
eallen
Posted: 13 January 2009 11:28 PM   [ Ignore ]  
Newbie
Rank
Total Posts:  10
Joined  2008-10-13

Requirements: Perl, DBD::mysql installed (along with DBI and such), full access to the server via terminal and mysql database.  YAML::Syck module isntalled (see search.cpan.org).

I screwed myself.  I backed up 1.6 into a yaml file and for the life of me couldnt get 1.7 to import.  ALL my work notes and task and project…*cold sweat*.. (i had done a complete system reinstall to ubuntu).

I did not make a mysql back…in any case, with the diff db structure i wouldve still had challenges.

I posted on the forum here my awkward and just plain “yuck” ruby/rails problem and each day that went by i felt lost b/c i had no notes and no reference to keep myself in order.  Besides a slew of other problems in installing 1.7 on ubuntu 8.10 intrepid, i tackled this a diff way.  Rather than wait for responses and more monkeying around, i just wrote a perl script.

Basically you just put the script where ever, edit it for your db settings and your yaml file path and let her rip.  I’m making a lot of assumptions here and am giving NO warranties.  Do this on a fresh database.  I basically looked at a perl dump of the yaml from 1.6 and just made the script work.

Since i ran it and it worked from me, i made it generic…took out my personal info and a few other clean ups.

Profile
 
eallen
Posted: 13 January 2009 11:28 PM   [ Ignore ]   [ # 1 ]  
Newbie
Rank
Total Posts:  10
Joined  2008-10-13

Updated below…

Profile
 
Reinier Balt
Posted: 14 January 2009 08:18 AM   [ Ignore ]   [ # 2 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

nice work!

I miss the taggings table. You will need it to attach a tag to a todo
Also the users table is missing. Did you add a new user before executing this script?

I see you left out preferences, but that is not a hard requirement since you can use 1.7 to set them

If you are willing to add these three tables, I can post your script on the wiki…

Profile
 
eallen
Posted: 14 January 2009 06:15 PM   [ Ignore ]   [ # 3 ]  
Newbie
Rank
Total Posts:  10
Joined  2008-10-13

Sure…it was just a quick and dirty of the tables i really needed…not too mention, the yaml dump of the 1.6 table only had those top level keys.

TOP LEVEL KEYS:
$VAR1 = ‘todos’;
$VAR2 = ‘contexts’;
$VAR3 = ‘notes’;
$VAR4 = ‘taggings’;
$VAR5 = ‘projects’;
$VAR6 = ‘tags’;

I did totally forget the taggings, added this…however, my backup file did not contain users or preferences, however i did add it to the script and it compiles.  No warranties smile

Profile
 
eallen
Posted: 14 January 2009 06:21 PM   [ Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  10
Joined  2008-10-13

Cant put the new script up…its not an image and its too big…where should i put it?

Profile
 
Reinier Balt
Posted: 15 January 2009 08:27 AM   [ Ignore ]   [ # 5 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

strange that the users table is not included. Probably because it contains data for other users and the yaml export is ment for exporting the todos of one user…

This does make your script work only for user_id == 1

You can try to put your script on the wiki yourself (I believe you can edit pages using the account your are using for this forum). Otherwise, email me the script and I’ll put it there. Thanks!

Profile
 
worms
Posted: 05 May 2009 01:51 PM   [ Ignore ]   [ # 6 ]  
Newbie
Rank
Total Posts:  6
Joined  2009-05-05

Via google I came across this post and am now looking for the script.  I couldn’t find it on the wiki is there another place to look?

Profile
 
Reinier Balt
Posted: 05 May 2009 07:00 PM   [ Ignore ]   [ # 7 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

I do not recall where the script went. I hope eallen has it somewhere.

Profile
 
worms
Posted: 06 May 2009 02:44 PM   [ Ignore ]   [ # 8 ]  
Newbie
Rank
Total Posts:  6
Joined  2009-05-05

Me too!  I am trying to migrate off of Morph Exchange ( Track 1.6 ) to my own server ( Tracks 1.7 ) so I can take advantage of the new features.  I’m trying to be lazy and not have to write my own script.

Profile
 
Reinier Balt
Posted: 06 May 2009 06:31 PM   [ Ignore ]   [ # 9 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

Is it not possible to get a mysql-dump from morphexchange?  You can import it into a new mysql database somewhere else, install tracks 1.7 and rake db:migrate to get to the 1.7 database structure…

Profile
 
worms
Posted: 06 May 2009 06:38 PM   [ Ignore ]   [ # 10 ]  
Newbie
Rank
Total Posts:  6
Joined  2009-05-05

according to this thread :

http://www.getontracks.org/forums/viewthread/219/#660

it doesn’t look like morph exchange does mysql-dumps

Profile
 
Reinier Balt
Posted: 06 May 2009 06:53 PM   [ Ignore ]   [ # 11 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

there is also a hidden experimental import function. This is not really tested well, but perhaps something to try if your adventurous

The code is still in tracks, only the gui is gone (done in this patch: http://github.com/bsag/tracks/commit/e21095f5949a736b8d0d45fe7cbba65b9a71d46b).

If you restore the gui, you’ll be able to try the yaml importer. Just change the gui in /app/view/data/index.html.erb back to
http://github.com/bsag/tracks/blob/3a56d2bdd2ad86718f263bc5d1263757d844bbaa/app/views/data/index.html.erb

Profile
 
Reinier Balt
Posted: 06 May 2009 06:54 PM   [ Ignore ]   [ # 12 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

remember, this code is not tested well, so check the result, if any…

Profile
 
worms
Posted: 06 May 2009 07:44 PM   [ Ignore ]   [ # 13 ]  
Newbie
Rank
Total Posts:  6
Joined  2009-05-05

Thanks for the info, I’ll give it a shot.

It’s a brand new Tracks install so I’m not too worried about trashing it.

Profile
 
worms
Posted: 07 May 2009 02:34 PM   [ Ignore ]   [ # 14 ]  
Newbie
Rank
Total Posts:  6
Joined  2009-05-05

Tried to do the import this morning, however I ran into an error.

Is there maybe some other missing code?

Application error (Apache)

Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html

———- from the log————-

NoMethodError (undefined method `ivars’ for #<Context:0xb7b3b2a0>):
  /vendor/rails/activerecord/lib/active_record/attribute_methods.rb:260:in `method_missing’
  /app/controllers/data_controller.rb:127:in `yaml_import’
  /app/controllers/data_controller.rb:126:in `each’
  /app/controllers/data_controller.rb:126:in `yaml_import’
  /vendor/rails/actionpack/lib/action_controller/base.rb:1253:in `send’
  /vendor/rails/actionpack/lib/action_controller/base.rb:1253:in `perform_action_without_filters’
  /vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters’
  /vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark’
  /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
  /usr/lib/ruby/1.8/benchmark.rb:293:in `measure’
  /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
  /vendor/rails/actionpack/lib/action_controller/rescue.rb:136:in `perform_action_without_caching’
  /vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action’
  /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache’
  /vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache’
  /vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action’
  /vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send’
  /vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters’
  /vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process_without_session_management_support’
  /vendor/rails/actionpack/lib/action_controller/session_management.rb:134:in `process’
  /vendor/rails/actionpack/lib/action_controller/base.rb:392:in `process’
  /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:183:in `handle_request’
  /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked’
  /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:123:in `dispatch’
  /usr/lib/ruby/1.8/thread.rb:135:in `synchronize’
  /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:122:in `dispatch’
  /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi’
  /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:39:in `dispatch’
  /vendor/rails/railties/lib/webrick_server.rb:103:in `handle_dispatch’
  /vendor/rails/railties/lib/webrick_server.rb:74:in `service’
  /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service’
  /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run’
  /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread’
  /usr/lib/ruby/1.8/webrick/server.rb:162:in `start’
  /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread’
  /usr/lib/ruby/1.8/webrick/server.rb:95:in `start’
  /usr/lib/ruby/1.8/webrick/server.rb:92:in `each’
  /usr/lib/ruby/1.8/webrick/server.rb:92:in `start’
  /usr/lib/ruby/1.8/webrick/server.rb:37:in `start’
  /usr/lib/ruby/1.8/webrick/server.rb:82:in `start’
  /vendor/rails/railties/lib/webrick_server.rb:60:in `dispatch’
  /vendor/rails/railties/lib/commands/servers/webrick.rb:66
  /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
  /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’
  /vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require’
  /vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in’
  /vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require’
  /vendor/rails/railties/lib/commands/server.rb:49
  /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
  /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’
  /var/www/tracks/script/server:3

Rendering /var/www/tracks-1.7/public/500.html (500 Internal Server Error)

Profile
 
worms
Posted: 07 May 2009 02:36 PM   [ Ignore ]   [ # 15 ]  
Newbie
Rank
Total Posts:  6
Joined  2009-05-05

ah, after looking at a link in http://github.com/bsag/tracks/commit/e21095f5949a736b8d0d45fe7cbba65b9a71d46b i see that someone else has had the same problem.  Which appears to be why the feature was pulled.

Back to square one.

Profile
 
   
 
 
‹‹ Right way to unhide an orphan hidden action?      Command line client to submit todos ››

Powered By ExpressionEngine
Template Design By Sonnenvogel.com
Select a theme:

ExpressionEngine Discussion Forum - Version 2.1.2 (20091002)
Script Executed in 0.1736 seconds

Atom Feed
RSS 2.0