rake db:migrate fails
phated opened this issue · 2 comments
phated commented
Here is the error message
== ChangeUsersMemberToInteger: migrating =====================================
-- change_column(:users, :member, :integer)
rake aborted!
An error has occurred, this and all later migrations canceled:
PG::DatatypeMismatch: ERROR: column "member" cannot be cast automatically to type integer
HINT: Specify a USING expression to perform the conversion.
: ALTER TABLE "users" ALTER COLUMN "member" TYPE integer/Users/phated/github/Open-Source-Access-Control-Web-Interface/db/migrate/20130125124102_change_users_member_to_integer.rb:3:in `change'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
phated commented
Happened while changing member_level to integer also. Logs attached.
== ChangeMemberLevelToInteger: migrating =====================================
-- change_column(:users, :member_level, :integer)
rake aborted!
An error has occurred, this and all later migrations canceled:
PG::DatatypeMismatch: ERROR: column "member_level" cannot be cast automatically to type integer
HINT: Specify a USING expression to perform the conversion.
: ALTER TABLE "users" ALTER COLUMN "member_level" TYPE integer/Users/phated/github/Open-Source-Access-Control-Web-Interface/db/migrate/20130922064241_change_member_level_to_integer.rb:3:in `up'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)