T
T
tank1232015-10-20 22:57:56
Ruby on Rails
tank123, 2015-10-20 22:57:56

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

1 answer(s)
R
Roman Mirilaczvili, 2015-10-22
@2ord

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 question

Ask a Question

731 491 924 answers to any question