20170912123300_remove_network.rb 578 B

123456789101112131415161718
  1. class RemoveNetwork < ActiveRecord::Migration[5.0]
  2. # rewinds db/migrate/20120101000020_create_network.rb
  3. def change
  4. return if !ActiveRecord::Base.connection.table_exists? 'networks'
  5. drop_table :networks
  6. drop_table :network_category_types
  7. drop_table :network_privacies
  8. drop_table :network_categories
  9. drop_table :network_categories_moderator_users
  10. drop_table :network_items
  11. drop_table :network_item_comments
  12. drop_table :network_item_plus
  13. drop_table :network_category_subscriptions
  14. drop_table :network_item_subscriptions
  15. end
  16. end