Rollback not working properly #11

Closed
krzkrzkrz opened this Issue Sep 29, 2010 · 2 comments

Comments

Projects
None yet
2 participants

If one decides to rollback. An error appears:

rake aborted!
An error has occurred, this and all later migrations canceled:

PGError: ERROR: column "string" of relation "users" does not exist
: ALTER TABLE "users" DROP "string"


The problem is at:

class AddDeviseTwitterFieldsToUsers < ActiveRecord::Migration

......

change_table(:users) do |t|
  t.remove :twitter_handle, :string
  t.remove :twitter_oauth_token, :string
  t.remove :twitter_oauth_secret, :string
end

end

it should be:

change_table(:users) do |t|
  t.remove :twitter_handle
  t.remove :twitter_oauth_token
  t.remove :twitter_oauth_secret
end

The above works if changed. Thought you might want to look at this...

Owner

MSch commented Sep 29, 2010

Fix migration (closed by 8a733e0, thanks krzkrzkrz!)

Owner

MSch commented Sep 29, 2010

Fixed, thanks!

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment