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

10 lines
292 B
Ruby
Executable File

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