Sha256: 50cc58eff0708b64dfbb6c3fbc554f6413cf8addcbe9ff9f350e7f92975c2c52

Contents?: true

Size: 424 Bytes

Versions: 8

Compression:

Stored size: 424 Bytes

Contents

class CreatePageAssociations < ActiveRecord::Migration
  def change
    create_table :mcms_page_parts_pages do |t|
      t.references :page
      t.references :page_part

      t.timestamps
    end

    add_foreign_key(:mcms_page_parts_pages, :mcms_pages, :column => 'page_id', :dependent => :delete)
    add_foreign_key(:mcms_page_parts_pages, :mcms_page_parts, :column => 'page_part_id', :dependent => :delete)

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mcms_pages-1.0.0 db/migrate/20120625063039_create_page_associations.rb
mcms_pages-0.0.7 db/migrate/20120625063039_create_page_associations.rb
mcms_pages-0.0.6 db/migrate/20120625063039_create_page_associations.rb
mcms_pages-0.0.5 db/migrate/20120625063039_create_page_associations.rb
mcms_pages-0.0.4 db/migrate/20120625063039_create_page_associations.rb
mcms_pages-0.0.3 db/migrate/20120625063039_create_page_associations.rb
mcms_pages-0.0.2 db/migrate/20120625063039_create_page_associations.rb
mcms_pages-0.0.1 db/migrate/20120625063039_create_page_associations.rb