Guest User

Untitled

a guest
Feb 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. action = ARGV[0] || 'dump'
  2. env = ARGV[1] || 'development'
  3. tables = ['sp_elements','sp_page_elements','sp_pages','sp_question_options',
  4. 'sp_questionnaire_pages','questionnaires']
  5. tables.each do |table|
  6. case action
  7. when 'dump'
  8. puts "#{table}: " +`rake db:fixtures:export_for_tables TABLES=#{table} RAILS_ENV=#{env} --trace`
  9. when 'load'
  10. puts "#{table}: " +`rake db:fixtures:import_for_tables TABLES=#{table} RAILS_ENV=#{env} --trace`
  11. end
  12. end
Add Comment
Please, Sign In to add comment