You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

13 lines
321 B

class CreateUserRoles < ActiveRecord::Migration[7.1]
def up
create_enum :user_roles, %w[user admin]
end
def down
# While there is a `create_enum` method, there is no way to drop it. You can
# how ever, use raw SQL to drop the enum type.
execute <<-SQL
DROP TYPE user_roles;
SQL
end
end