Advertisement
twinfacer

migration

Apr 9th, 2014
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. class ChangePageToSectionPageInSiteTemplates < ActiveRecord::Migration
  2. def change
  3. remove_column :site_templates, :site_section_id
  4. remove_column :site_templates, :page_id
  5. remove_index :site_templates, :site_section_id
  6. remove_index :site_templates, :page_id
  7.  
  8. add_column :site_templates, :site_section_id, :integer, null: false
  9. add_column :site_templates, :section_page_id, :integer
  10. add_index :site_templates, :section_page_id
  11. add_index :site_templates, :page_id
  12. end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement