我在生产服务器上运行了 sevreal 迁移(添加表 Subscription,将表 Stat 重命名为 Order),但随后遇到了问题。我不知道该怎么做才能解决这个问题。这是我在rails控制台中的错误消息:
ActiveRecord::StatementInvalid: PG::Error: ERROR: relation "subscriptions" does not exist
LINE 5: WHERE a.attrelid = '"subscriptions"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"subscriptions"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
编辑:我已经制作了 rake db:migrate 编辑 2:https ://gist.github.com/anonymous/0963ec46f079699a56a0(这里是我的 schema.rb) 编辑 3:我的应用程序是 Alwaysdata 上的主机,我已经重新启动它