Answer the question
In order to leave comments, you need to log in
How to display new fields in schema.rb?
I'm learning rails from video tutorials. The topic of migration. Created a database, added fields. Chased away. Now we test. New fields are not shown in schema.rb. How to test the base?
Windows7. Connected sqlite3 and MySQL. Used the standard db:migrate and db:test:clone commands. How to check if the migration has passed? How to define fields? How to display data in schema.rb?
Answer the question
In order to leave comments, you need to log in
schema.rb will only display the new state of the database schema if the migration was successful.
To check the latest version of the latest database migration, run the command bundle exec rake db:version
Should show the line
Current version: ... (date)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question