#---
# Excerpted from "Rails Recipes"
# We make no guarantees that this code is fit for any purpose. 
# Visit http://www.pragmaticprogrammer.com/titles/fr_rr for more book information.
#---
class CreateJoinModelReadershipSchema < ActiveRecord::Migration

  def self.up 
    drop_table :magazines_readers
    create_table :subscriptions do |t|
      t.column :reader_id, :integer
      t.column :magazine_id, :integer
      t.column :last_renewal_on, :date
      t.column :length_in_issues, :integer
    end
  end

  def self.down                           
    drop_table :subscriptions
  end
end
