Open-Source-Access-Control-.../db/migrate/20130125124102_change_users_member_to_integer.rb
2014-02-09 00:56:48 -07:00

10 lines
268 B
Ruby
Executable File

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