Sha256: 9034d6860e831fad9a979a3a680ffade29ff5da3fad2bafcb95babcdf847d19d

Contents?: true

Size: 704 Bytes

Versions: 9

Compression:

Stored size: 704 Bytes

Contents

class InstallPermissive < ActiveRecord::Migration
  def self.up
    create_table :permissive_permissions do |t|
      t.integer :permitted_object_id
      t.string :permitted_object_type, :limit => 32
      t.integer :scoped_object_id
      t.string :scoped_object_type, :limit => 32
      t.integer :mask, :default => 0
    end
    add_index :permissive_permissions, [:permitted_object_id, :permitted_object_type], :name => 'permissive_permitted'
    add_index :permissive_permissions, [:scoped_object_id, :scoped_object_type], :name => 'permissive_scoped'
    add_index :permissive_permissions, :mask, :name => 'permissive_masks'
  end

  def self.down
    drop_table :permissive_permissions
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
permissive-0.2.9.alpha generators/permissive_migration/templates/permissive_migration.rb
permissive-0.2.8.alpha generators/permissive_migration/templates/permissive_migration.rb
permissive-0.2.7.alpha generators/permissive_migration/templates/permissive_migration.rb
permissive-0.2.6.alpha generators/permissive_migration/templates/permissive_migration.rb
permissive-0.2.5.alpha generators/permissive_migration/templates/permissive_migration.rb
permissive-0.2.4.alpha generators/permissive_migration/templates/permissive_migration.rb
permissive-0.2.2.alpha generators/permissive_migration/templates/permissive_migration.rb
permissive-0.2.1.alpha generators/permissive_migration/templates/permissive_migration.rb
permissive-0.2.0.alpha generators/permissive_migration/templates/permissive_migration.rb