我在heroku上部署了一個ruby on rails應用程序。在localhost一切都很順利,但運行Heroku「Globalize3」遷移失敗
時Heroku的耙分貝:遷移
運行在Heroku遷移我的遷移失敗,此錯誤:
rake aborted! An error has occurred, this and all later migrations canceled:
PGError: ERROR: current transaction is aborted, commands ignored until end of transaction block : CREATE TABLE "product_translations" ("id" serial primary key, "product_id" integer, "locale" character varying(255), "description" text, "created_at" timestamp, "updated_at" timestamp)
(See full trace by running task with --trace)
我的遷移是建立如下:
class CreateProducts < ActiveRecord::Migration
def self.up
create_table :products do |t|
t.string :image_path
t.text :description
t.timestamps
end
Product.create_translation_table! :description => :text
end
def self.down
drop_table :products
Product.drop_translation_table!
end
end
看來用於爲globalize3(Product.create_translation_table!方法)創建表的查詢失敗。
任何想法?
在此先感謝