20170912123300_remove_network.rb 622 B

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