Skip to content

Instantly share code, notes, and snippets.

@nicinabox
Created June 29, 2011 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicinabox/1054888 to your computer and use it in GitHub Desktop.
Save nicinabox/1054888 to your computer and use it in GitHub Desktop.
class AddAreasPortfolioEntries < ActiveRecord::Migration
def self.up
create_table "areas_portfolio_entries", :id => false do |t|
t.references :portfolio_entry
t.references :area
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"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment