Setup, Reset And Drop Database
TAGS:
ruby rails migration database setup reset drop
Related:
- Adding fields to table via migration.
- Creating migration file using generate migration
- Creation migration file using generate model.
- Creating migration file using scaffold.
- Drop tables using migration.
- Editing migration file manually.</li>
- Seeding data into tables via migration.
- Joining two tables via migration.
- Migration specific VERSION or STEP.
- Removing fields from tables via migration.
- Setting rails environment via migration command.
</ul>
Setup, Reset and Drop Database Via Rails Console.
Setting up the database using `rake db:setup` will create the database and migrate the migration files. Also, Resetting the database usingrake db:setup
will re-migrate the migration files. But, Drop the database usingrake db:reset
This will delete the the database itself.rake db:drop
Note, `rake db:reset` equals `rake db:drop db:setup`.
Now, Take a look to this tutorial video: