Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Migration

ZeroC0D3 Team edited this page Jan 9, 2018 · 2 revisions

Migration Database

  1. Migration database & seed
## Rails < 5.0
bundle exec bin/rake db:migrate db:seed RAILS_ENV=[environment]
## Rails >= 5.0
bundle exec bin/rails db:migrate db:seed RAILS_ENV=[environment]
  • Optional: RAILS_ENV (test, development, staging, production)
  • For production environment use addtional command:
DISABLE_DATABASE_ENVIRONMENT_CHECK=1
  1. For specific seed class
## Rails < 5.0
bundle exec bin/rake db:seed SEED_FILES=[class_name] RAILS_ENV=[environment]
## Rails >= 5.0
bundle exec bin/rails db:seed SEED_FILES=[class_name] RAILS_ENV=[environment]

Note

  • Use option --trace for debug
Clone this wiki locally