about summary refs log tree commit diff
path: root/db/post_migrate
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2021-05-11 11:19:04 -0500
committerStarfall <us@starfall.systems>2021-05-11 11:19:04 -0500
commitd56731a0b9d73c48bbfbced8732e25587ba892a4 (patch)
treed3830ce2e0292ce07336496e40882c222f455a33 /db/post_migrate
parent459a36ab7303db4ee59945b4b2121b25cc86eb38 (diff)
parentffc3f8eebe134ca9b18af73aa29eaa1627082e40 (diff)
Merge branch 'glitch'
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20210502233513_drop_account_tag_stats.rb13
-rw-r--r--db/post_migrate/20210507001928_remove_hub_url_from_accounts.rb12
2 files changed, 25 insertions, 0 deletions
diff --git a/db/post_migrate/20210502233513_drop_account_tag_stats.rb b/db/post_migrate/20210502233513_drop_account_tag_stats.rb
new file mode 100644
index 000000000..80adadcab
--- /dev/null
+++ b/db/post_migrate/20210502233513_drop_account_tag_stats.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class DropAccountTagStats < ActiveRecord::Migration[5.2]
+  disable_ddl_transaction!
+
+  def up
+    drop_table :account_tag_stats
+  end
+
+  def down
+    raise ActiveRecord::IrreversibleMigration
+  end
+end
diff --git a/db/post_migrate/20210507001928_remove_hub_url_from_accounts.rb b/db/post_migrate/20210507001928_remove_hub_url_from_accounts.rb
new file mode 100644
index 000000000..83a1f5fcf
--- /dev/null
+++ b/db/post_migrate/20210507001928_remove_hub_url_from_accounts.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class RemoveHubURLFromAccounts < ActiveRecord::Migration[5.2]
+  def change
+    safety_assured do
+      remove_column :accounts, :secret, :string, null: false, default: ''
+      remove_column :accounts, :remote_url, :string, null: false, default: ''
+      remove_column :accounts, :salmon_url, :string, null: false, default: ''
+      remove_column :accounts, :hub_url, :string, null: false, default: ''
+    end
+  end
+end