Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- action = ARGV[0] || 'dump'
- env = ARGV[1] || 'development'
- tables = ['sp_elements','sp_page_elements','sp_pages','sp_question_options',
- 'sp_questionnaire_pages','questionnaires']
- tables.each do |table|
- case action
- when 'dump'
- puts "#{table}: " +`rake db:fixtures:export_for_tables TABLES=#{table} RAILS_ENV=#{env} --trace`
- when 'load'
- puts "#{table}: " +`rake db:fixtures:import_for_tables TABLES=#{table} RAILS_ENV=#{env} --trace`
- end
- end
Add Comment
Please, Sign In to add comment