Difference between revisions of "Rake tasks"
(→Setting the environment) |
m (→mx:db:restore_last) |
||
Line 31: | Line 31: | ||
=== mx:db:restore_last === | === mx:db:restore_last === | ||
− | + | Dumps the current data to /dumps, then restores the data from the (next) youngest dump file (like "2008_07_03_224250.sql") in /dumps. | |
=== mx:db:setup* === | === mx:db:setup* === |
Revision as of 11:58, 5 July 2008
Setting the environment
Some of the most important tasks for an mx developer are those that move data in and out of the database (tasks starting with "mx:db:"). Since RAILS_ENV defaults to 'production' in our current environment.rb, you have to specify if you want to operate on the development database, for example:
rake mx:db:restore_last RAILS_ENV=development
You can see more about a specific task (if there is more to see) with --describe
rake --describe mx:db:restore_last
Available mx tasks
This is in progress, starred tasks are not recently (re)tested.
mx:clean_author_initials *
Removes all characters other than A-...
mx:db:dump_data
Dump the data to an SQL file
mx:db:reload
Dump the data, recreate the tables a...
mx:db:restore
Dump the data as a backup, then rest...
mx:db:restore_last
Dumps the current data to /dumps, then restores the data from the (next) youngest dump file (like "2008_07_03_224250.sql") in /dumps.
mx:db:setup*
(not working yet)
mx:fk_schema*
deprecated with upcoming migrations Generate the foreign key statements ...
mx:load_images
Call like: "rake mx:load_images img_...
mx:load_languages
should deprecate with migration, a one-time use Loads the language table. Call like: "rake mx:load_languages f...
mx:matrix:debug
Debug a nexus file against the parser.
mx:matrix:load
Load one or more matrices.
mx:prepare_release
Export a copy of the mx source code ...
mx:setup_directories*
Creates the directories mx uses for ...
mx:update_ref_display_names*
Update all Ref display_name fields.