【发布时间】:2012-05-09 23:00:43
【问题描述】:
在 Rails 迁移中。如何将字符串类型的列更改为 bigint?
我有:
t.change :ip_number_from, :integer, :limit => 8
我明白了:
PG::Error: ERROR: column "ip_number_from" cannot be cast to type bigint
我什至尝试了两种选择:
change_column :ip_to_countries, :ip_number_from, :integer, :limit => 8
change_column :ip_to_countries, :ip_number_from, :bigint
还是同样的错误。
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 postgresql heroku migration