Created
December 26, 2011 18:41
-
-
Save procload/1521889 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DropEventsTable < ActiveRecord::Migration | |
def up | |
create_table :meetups_planners, :id => false do |t| | |
t.references :meetup, :null => false | |
t.references :planner, :null => false | |
end | |
add_index(:meetups_planners, [:meetup_id, :planner_id], :unique => true) | |
end | |
def down | |
execute "ALTER TABLE events DROP FOREIGN KEY fk_products_categories" | |
drop_table :events | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment