Sha256: db39312f570aa50356403c2b7ec48a07ee44aa18cd5721a99ffe0a5a5cf8b468
Contents?: true
Size: 604 Bytes
Versions: 12
Compression:
Stored size: 604 Bytes
Contents
class AddOneRoleStrategy < ActiveRecord::Migration class << self def up create_roles add_user_role end def down drop_roles remove_user_role end protected def add_user_role change_table :users do |t| t.integer :role_id end end def remove_user_role change_table :users do |t| t.remove :role_id end end def create_roles create_table :roles do |t| t.string :name t.timestamps end end def drop_roles drop_table :roles end end end
Version data entries
12 entries across 12 versions & 1 rubygems