rails-db

rails-db

TLDR

Create databases, load the schema, and initialize with seed data

>_ rails db:setup
copy

Access the database console

>_ rails db
copy

Create the databases defined in the current environment

>_ rails db:create
copy

Destroy the databases defined in the current environment

>_ rails db:drop
copy

Run pending migrations

>_ rails db:migrate
copy

View the status of each migration file

>_ rails db:migrate:status
copy

Rollback the last migration

>_ rails db:rollback
copy

Fill the current database with data defined in db/seeds.rb

>_ rails db:seed
copy

Copied to clipboard
free 100$ digital ocean credit