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

后端 未结 7 1759
盖世英雄少女心
盖世英雄少女心 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:18

    It may happened because you've added new columns to a table with old data that is now missing values. I've had the same problem with my test database and fixed it just by running

    $ rails db:setup
    

    CAUTION

    It deletes all of the data. This command runs rails db:reset, rails db:migrate and rails db:seed

提交回复
热议问题