Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue [unable to proceed]

后端 未结 7 1764
盖世英雄少女心
盖世英雄少女心 2020-12-23 14:52

I appear to have a circular issue in regards to Ruby on Rails migration procedure. I am following the introduction article and I have reached the point when I need to creat

7条回答
  •  情书的邮戳
    2020-12-23 15:16

    One weird trick that you can use when your migrations are screwed (file deleted, manually renamed, etc.)

    1. Fire up your favourite DB admin tool (eg. PGAdmin3) and browse to the database in question.
    2. Look for a table called schema_migrations and browse its content. It should have a single column called version. This field is used by Rails to check whether migrations are up to date.
    3. Make sure that your migration timestamps corresponds with the data in this column. If you have deleted an older migration, delete the corresponding timestamp.

提交回复
热议问题