Sha256: aa9b3c0f731b376260228a367e0821f6d9a11ab62ad51df96106f10d57edd142

Contents?: true

Size: 310 Bytes

Versions: 9

Compression:

Stored size: 310 Bytes

Contents

class CreateRoles < ActiveRecord::Migration
  def self.up
    create_table :roles do |t|
      t.integer :role_type, :limit => 1, :default => 0
      t.integer :user_id, :null => false
      
      t.timestamps
    end
    
    add_index :roles, :user_id
  end

  def self.down
    drop_table :roles
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sunrise-cms-0.4.2 db/migrate/20111216144815_create_roles.rb
sunrise-cms-0.4.1 db/migrate/20111216144815_create_roles.rb
sunrise-cms-0.4.0 db/migrate/20111216144815_create_roles.rb
sunrise-cms-0.3.3 db/migrate/20111216144815_create_roles.rb
sunrise-cms-0.3.2 db/migrate/20111216144815_create_roles.rb
sunrise-cms-0.3.1 db/migrate/20111216144815_create_roles.rb
sunrise-cms-0.3.0 db/migrate/20111216144815_create_roles.rb
sunrise-cms-0.3.0.rc2 db/migrate/20111216144815_create_roles.rb
sunrise-cms-0.3.0.rc db/migrate/20111216144815_create_roles.rb