20170912123300_remove_network.rb 673 B

1234567891011121314151617181920
  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. # rubocop:disable Rails/ReversibleMigration
  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. # rubocop:enable Rails/ReversibleMigration
  17. end
  18. end