I have a strange issue with migrations. The last migration file is: 20190826113704_add_percentage_account_to_contacts.rb
.
The timestamp in schema.rb
is ActiveRecord::Schema.define(version: 2019_08_26_113704)
.
So you would say everything is up to date. When I start the server and go to the site I get the Migrations are pending
error. So when I run rails db:migrate
I get an error relation "study_agreements" already exists
which is correct, there are no migrations pending.
So how can I solve this?
It seems you have already have a table in DB and you have down migrated file in your migrate folder. you can do 2 things here:
rails db:schema:load
ORrails db:reset
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With