Created
June 29, 2011 20:37
-
-
Save nicinabox/1054888 to your computer and use it in GitHub Desktop.
This file contains 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 AddAreasPortfolioEntries < ActiveRecord::Migration | |
def self.up | |
create_table "areas_portfolio_entries", :id => false do |t| | |
t.integer :portfolio_entry_id | |
t.integer :area_id | |
end | |
add_index :areas_portfolio_entries, :portfolio_entry_id | |
add_index :areas_portfolio_entries, :area_id | |
end | |
def self.down | |
drop_table "areas_portfolio_entries" | |
remove_index :areas_portfolio_entries, :portfolio_entry_id | |
remove_index :areas_portfolio_entries, :area_id | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment