简体   繁体   中英

Rails app working locally but not on Heroku

I inherited a rails app running on heroku. I needed to add some database fields which I did and it works locally. I deployed a new version to heroku, ran db:migrate, but for some reason it's not working. It seems to think the fields don't exist, but running db:migrate:status I can see the migrations have run:

> heroku run rake db:migrate:status
Running rake db:migrate:status attached to terminal... up, run.6278

database: **censored***

Status   Migration ID    Migration Name
--------------------------------------------------
up     20120107003506  Create conferences
up     20120112003506  Create users
up     20120116200332  Alter conferences country varchar
up     20120116213331  Alter conferences subject varchar
up     20120123215724  Split user name in two
up     20120123224808  Alter conferences add csv generated date
up     20120128211622  Increase conference text field size
up     20120128213531  Add indexes to conferences
up     20120131192147  Add role to user
up     20120131225950  Change subject to subject
up     20120209204719  Add status id to conferences
up     20120625221325  Add index to status
up     20120625225604  Add email sent to conferences
up     20120626231155  Rename email sent column
up     20120706141747  Set organiser emails to lowercase
up     20160112093201  Add conference type to conference
up     20160112142416  New fields

The last two migrations are mine. Do I need to do something else?

Versions: ruby 1.9.3 rails 3.2.3

You need to restart your Dyno for the migrations to take effect. From the command line:

heroku restart -a your_app_name

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM