Sha256: 409fbf6f7673adac33a1b114d57774e7cb1ae6b16122edb5e4ad5c1fd44586a1

Contents?: true

Size: 581 Bytes

Versions: 10

Compression:

Stored size: 581 Bytes

Contents

class CreateWebsitePartyRoles < ActiveRecord::Migration
  def up
    unless table_exists? :website_party_roles
      create_table :website_party_roles do |t|
        #foreign keys
        t.references :website
        t.references :role_type
        t.references :party

        t.timestamps
      end

      add_index :website_party_roles, :website_id
      add_index :website_party_roles, :role_type_id
      add_index :website_party_roles, :party_id
    end
  end

  def down
    unless table_exists? :website_party_roles
      drop_table :website_party_roles
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
knitkit-2.0.11 db/migrate/upgrade/20120127143745_create_website_party_roles.rb
knitkit-2.0.10 db/migrate/upgrade/20120127143745_create_website_party_roles.rb
knitkit-2.0.9 db/migrate/upgrade/20120127143745_create_website_party_roles.rb
knitkit-2.0.7 db/migrate/upgrade/20120127143745_create_website_party_roles.rb
knitkit-2.0.6 db/migrate/upgrade/20120127143745_create_website_party_roles.rb
knitkit-2.0.5 db/migrate/upgrade/20120127143745_create_website_party_roles.rb
knitkit-2.0.4 db/migrate/upgrade/20120127143745_create_website_party_roles.rb
knitkit-2.0.3 db/migrate/upgrade/20120127143745_create_website_party_roles.rb
knitkit-2.0.2 db/migrate/upgrade/20120127143745_create_website_party_roles.rb
knitkit-2.0.1 db/migrate/upgrade/20120127143745_create_website_party_roles.rb