Open-Source-Access-Control-.../db/migrate/20130125124102_change_users_member_to_integer.rb

10 lines
268 B
Ruby

class ChangeUsersMemberToInteger < ActiveRecord::Migration
def up
execute 'ALTER TABLE users ALTER COLUMN member TYPE integer USING (member::integer)'
end
def down
execute 'ALTER TABLE users ALTER COLUMN member TYPE text USING (member::text)'
end
end