17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/generators/motor/upgrade_generator.rb', line 17
def copy_migration
unless Motor::ApiConfig.table_exists?
migration_template 'install_api_configs.rb', 'db/migrate/install_motor_api_configs.rb'
end
if with_api_actions?
migration_template 'upgrade_motor_api_actions.rb', 'db/migrate/upgrade_motor_api_actions.rb'
end
migration_template 'install_notes.rb', 'db/migrate/install_motor_notes.rb' unless Motor::Note.table_exists?
if Motor::ApiConfig.table_exists? && !with_api_actions? && Motor::Note.table_exists?
puts 'The latest Motor Admin features are already configured'
else
puts 'Run `rake db:migrate` to update DB schema'
end
end
|