Sha256: 3a719c93e491b4d6195eaf9ecf2d5c54b41647c8cd9ebeb2aa647c348ba26a2d

Contents?: true

Size: 942 Bytes

Versions: 3

Compression:

Stored size: 942 Bytes

Contents

class CreateCbacUpgradePath < ActiveRecord::Migration
  def self.up

    create_table :cbac_pristine_files do |t|
      t.string :type
      t.string :file_name
      t.timestamps
    end

    create_table :cbac_staged_permissions do |t|
      t.integer :pristine_role_id
      t.integer :pristine_file_id
      t.string :privilege_set_name
      t.integer :line_number
      t.string :comment
      t.text :operation, :limit => 2
      t.timestamps
    end

    create_table :cbac_staged_roles do |t|
      t.string :role_type
      t.string :name
      t.integer :role_id
      t.timestamps
    end
    
    create_table :cbac_known_permissions do |t|
      t.integer :permission_number, :null => :no
      t.integer :permission_type, :default => 0
    end

  end

  def self.down
    drop_table :cbac_pristine_files
    drop_table :cbac_staged_permissions
    drop_table :cbac_staged_roles
    drop_table :cbac_known_permissions
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cbac-0.6.5 lib/generators/cbac/copy_files/migrate/create_cbac_upgrade_path.rb
cbac-0.6.4 lib/generators/cbac/copy_files/migrate/create_cbac_upgrade_path.rb
cbac-0.6.2 lib/generators/cbac/copy_files/migrate/create_cbac_upgrade_path.rb