File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,13 @@ rails db:seed # Run all seed files
5454Other useful database commands:
5555
5656``` bash
57- rails db:migrate # Run pending migrations
58- rails db:rollback # Rollback last migration
59- rails db:reset # Drop & recreate database
60- rails db:setup # Create database, load schema, and initialize with seed data
57+ rails db:migrate # Run pending migrations
58+ rails db:rollback # Rollback last migration
59+ rails db:reset # Drop & recreate database
60+ rails db:setup # Create database, load schema, and initialize with seed data
61+ rails db:drop db:create db:migrate # Reset database by dropping, creating, and running migrations
62+ ActiveRecord::Base.connection.tables # List all database tables
63+ ActiveRecord::Base.connection.columns(' users' ).map(& :name) # List all column names of the 'users' table
6164```
6265
6366## Code Quality Tools
You can’t perform that action at this time.
0 commit comments