提交 4eb7d82a 编写于 作者: A Andrey Kumanyaev

add support use string FK with integer PK

上级 3e1d52f4
class PostgresCreateIntegerCast < ActiveRecord::Migration
def up
execute <<-SQL
CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;
SQL
rescue ActiveRecord::StatementInvalid
end
def down
execute <<-SQL
DROP CAST (integer AS text);
SQL
rescue ActiveRecord::StatementInvalid
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册