Sha256: 44cf0b26098e99c41e38fe69e017154404045f55c956653ac2cdeca53532077c

Contents?: true

Size: 410 Bytes

Versions: 8

Compression:

Stored size: 410 Bytes

Contents

class RadminCreateAssignments < ActiveRecord::Migration
  def self.up
    create_table :radmin_assignments do |t|
      t.references :radmin_user
      t.references :radmin_role
      t.timestamps
    end
    add_index :radmin_assignments, [:radmin_user_id,:radmin_role_id], :unique => true
    add_index :radmin_assignments, :radmin_role_id
  end

  def self.down
    drop_table :radmin_assignments
  end
end

Version data entries

8 entries across 4 versions & 1 rubygems

Version Path
radmin-0.3.3 lib/generators/radmin/templates/migrations/03_radmin_create_assignments.rb
radmin-0.3.3 spec/dummy/db/migrate/20110524171911_radmin_create_assignments.rb
radmin-0.3.2 lib/generators/radmin/templates/migrations/03_radmin_create_assignments.rb
radmin-0.3.2 spec/dummy/db/migrate/20110524171911_radmin_create_assignments.rb
radmin-0.3.1 lib/generators/radmin/templates/migrations/03_radmin_create_assignments.rb
radmin-0.3.1 spec/dummy/db/migrate/20110524171911_radmin_create_assignments.rb
radmin-0.2.0 lib/generators/radmin/templates/migrations/03_radmin_create_assignments.rb
radmin-0.2.0 spec/dummy/db/migrate/20110524171911_radmin_create_assignments.rb