Sha256: 43f7e93cebc9b87b9a81383c0e1593835f6930f7899d18ad913c4712611c1d63

Contents?: true

Size: 544 Bytes

Versions: 35

Compression:

Stored size: 544 Bytes

Contents

class MakeShowsAndSectionsHabtm < ActiveRecord::Migration
  def up
    create_table(:discounts_shows) do |t|
      t.integer :discount_id, :null => false
      t.integer :show_id, :null => false
    end
    create_table(:discounts_sections) do |t|
      t.integer :discount_id, :null => false
      t.integer :section_id, :null => false
    end
    remove_column :discounts, :shows_and_sections
  end

  def down
    drop_table :discounts_shows
    drop_table :discounts_sections
    add_column :discounts, :shows_and_sections, :text
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
artfully_ose-1.3.0.pre4 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.3.0.pre3 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.3.0.pre2 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.3.0.pre1 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.beta.1 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.alpha.2 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.alpha.1 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.pre.27 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.pre.26 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.pre.24 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.pre.23 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.pre.21 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.pre.20 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.pre.19 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.pre.18 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.pre.17 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.pre.16 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.pre.15 db/migrate/20130103153946_make_shows_and_sections_habtm.rb
artfully_ose-1.2.0.pre.12 db/migrate/20130103153946_make_shows_and_sections_habtm.rb