大神帮我看看这个问题怎么解决
ruby吧
全部回复
仅看楼主
level 1
stephanielw88 楼主
[Web Dev]: /vagrant/src/nomster $ rails g migration add_pic_to_photos picture:stringinvoke active_recordcreate db/migrate/20141126015328_add_pic_to_photos.rb[Web Dev]: /vagrant/src/nomster $ rake db:migrate== AddPictureToPhoto: migrating ==============================================-- add_column(:photos, :picture, :string)rake aborted!StandardError: An error has occurred, this and all later migrations canceled: PG::DuplicateColumn: ERROR: column "picture" of relation "photos" already exists: ALTER TABLE "photos" ADD COLUMN "picture" character varying(255)/vagrant/src/nomster/db/migrate/20141126000428_add_picture_to_photo.rb:3:in `change'Tasks: TOP => db:migrate(See full trace by running task with --trace)
我之前有重复migrate一个column, 但是我后来都remove了,然后又重新加了一个column, 但是还是说我有重复的。我的schema.rb 里面都没有看见 picture加进去。 我现在卡在这里就永远加不进去了吗?
2014年11月26日 08点11分 1
1