From 88dce41be1edf0eb044356b74f8f8367042140fd Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 29 Nov 2019 16:28:39 +0000 Subject: [PATCH] DEV: Drop unused google and instagram auth_info tables Information was migrated to user_associated_accounts in fc7938f7e081318ad52462bd2aa1c95e61fb5d03 and 703c724cf3adff0feb89f99be30f4fb4ed540e22 --- ...rop_unused_google_instagram_auth_tables.rb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 db/post_migrate/20191129144706_drop_unused_google_instagram_auth_tables.rb diff --git a/db/post_migrate/20191129144706_drop_unused_google_instagram_auth_tables.rb b/db/post_migrate/20191129144706_drop_unused_google_instagram_auth_tables.rb new file mode 100644 index 00000000000..f1b3df2e60a --- /dev/null +++ b/db/post_migrate/20191129144706_drop_unused_google_instagram_auth_tables.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +require 'migration/table_dropper' + +class DropUnusedGoogleInstagramAuthTables < ActiveRecord::Migration[6.0] + DROPPED_TABLES ||= %i{ + google_user_infos + instagram_user_infos + } + + def up + DROPPED_TABLES.each do |table| + Migration::TableDropper.execute_drop(table) + end + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end