FIX: MigrateInviteRedeemedDataToInvitedUsers should be normal migration (#10013)

FIX: MigrateInviteRedeemedDataToInvitedUsers should be normal migration (#10013)

diff --git a/db/migrate/20200602153813_migrate_invite_redeemed_data_to_invited_users.rb b/db/migrate/20200602153813_migrate_invite_redeemed_data_to_invited_users.rb
new file mode 100644
index 0000000..7f38286
--- /dev/null
+++ b/db/migrate/20200602153813_migrate_invite_redeemed_data_to_invited_users.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+require 'migration/column_dropper'
+
+class MigrateInviteRedeemedDataToInvitedUsers < ActiveRecord::Migration[6.0]
+  def up
+    %i{user_id redeemed_at}.each do |column|
+      Migration::ColumnDropper.mark_readonly(:invites, column)
+    end
+
+    execute <<~SQL
+      INSERT INTO invited_users (
+        user_id,
+        invite_id,
+        redeemed_at,
+        created_at,
+        updated_at
+      )
+      SELECT user_id, id, redeemed_at, created_at, updated_at
+      FROM invites
+      WHERE user_id IS NOT NULL AND redeemed_at IS NOT NULL
+    SQL
+  end
+
+  def down
+    raise ActiveRecord::IrreversibleMigration
+  end
+end
diff --git a/db/post_migrate/20200602153813_migrate_invite_redeemed_data_to_invited_users.rb b/db/post_migrate/20200602153813_migrate_invite_redeemed_data_to_invited_users.rb
deleted file mode 100644
index 29c2927..0000000
--- a/db/post_migrate/20200602153813_migrate_invite_redeemed_data_to_invited_users.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class MigrateInviteRedeemedDataToInvitedUsers < ActiveRecord::Migration[6.0]
-  def up
-    %i{user_id redeemed_at}.each do |column|
-      Migration::ColumnDropper.mark_readonly(:invites, column)
-    end
-
-    execute <<~SQL
-      INSERT INTO invited_users (
-        user_id,
-        invite_id,
-        redeemed_at,
-        created_at,
-        updated_at
-      )
-      SELECT user_id, id, redeemed_at, created_at, updated_at
-      FROM invites
-      WHERE user_id IS NOT NULL AND redeemed_at IS NOT NULL
-    SQL
-  end
-
-  def down
-    raise ActiveRecord::IrreversibleMigration
-  end
-end

GitHub sha: 274db95f

This commit appears in #10013 which was merged by techAPJ.