Sha256: 3631b1b6d6d9c925a7f9b8678a7540a189350816b6eb37c5363004b9cd3cfdc8

Contents?: true

Size: 328 Bytes

Versions: 1

Compression:

Stored size: 328 Bytes

Contents

class CreatePermissions < ActiveRecord::Migration
  def self.up
    create_table :permissions do |t|
      t.column :controller_id, :integer, :null => false
      t.column :action, :string
    end
    add_index :permissions, [:controller_id, :action], :unique => true
  end

  def self.down
    drop_table :permissions
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
has_roles-0.0.2 db/migrate/002_create_permissions.rb