Sha256: 564b53d3e3ee4ec8950abc0352db6045d2b79fa13070c0c23a164118be8642d2

Contents?: true

Size: 522 Bytes

Versions: 31

Compression:

Stored size: 522 Bytes

Contents

class SetPrimaryKeyNotNullForDivisions < ActiveRecord::Migration
  def up
    drop_table :divisions
    create_table :divisions, :id => false do |t|
      t.timestamps
      t.primary_key :custom_id
      t.integer :custom_league_id
      t.string :name, :limit => 50, :null => false
    end

  end

  def down
    drop_table :divisions
    create_table :divisions, :primary_key => :custom_id do |t|
      t.timestamps
      t.integer :custom_league_id
      t.string :name, :limit => 50, :null => false
    end
  end
end

Version data entries

31 entries across 31 versions & 6 rubygems

Version Path
rails_admin-0.6.0 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.5.0 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.4.9 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.4.8 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.4.7 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.4.6 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.4.5 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.4.4 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-lbgraham-0.4.2 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.4.3 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.4.2 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.4.1 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.4.0 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.3.0 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.2.0 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.1.2 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.1.1 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.1.0 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.0.5 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb
rails_admin-0.0.4 spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb