Class: ActsAsActor

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/templates/migration/migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/templates/migration/migration.rb', line 3

def change

  create_table :roles do |t|
    t.string :name, :null => false
    t.integer :access_level, :null => false, :default => 0
    t.timestamps
  end

  create_table :user_roles do |t|
    t.references :user
    t.references :role
    t.timestamps
  end
  
end