about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-03-15 11:26:59 +0100
committerClaire <claire.github-309c@sitedethib.com>2021-03-15 11:26:59 +0100
commiteac4a3e9c82b0ff8ade2e8b86282387df6039868 (patch)
treed16cecb0e7c74dc8498074ce5e0670a4b3c67b2f /db
parent995ad2af30d4838d07d68f0e89f1868307d1e478 (diff)
parente89e976e924f558d13893726b3edda7b428988fd (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200508212852_reset_unique_jobs_locks.rb2
-rw-r--r--db/post_migrate/20210308133107_remove_subscription_expires_at_from_accounts.rb7
-rw-r--r--db/schema.rb3
3 files changed, 9 insertions, 3 deletions
diff --git a/db/migrate/20200508212852_reset_unique_jobs_locks.rb b/db/migrate/20200508212852_reset_unique_jobs_locks.rb
index 3ffdeb0aa..304e49322 100644
--- a/db/migrate/20200508212852_reset_unique_jobs_locks.rb
+++ b/db/migrate/20200508212852_reset_unique_jobs_locks.rb
@@ -5,7 +5,7 @@ class ResetUniqueJobsLocks < ActiveRecord::Migration[5.2]
     # We do this to clean up unique job digests that were not properly
     # disposed of prior to https://github.com/tootsuite/mastodon/pull/13361
 
-    SidekiqUniqueJobs::Digests.delete_by_pattern('*', count: SidekiqUniqueJobs::Digests.count)
+    until SidekiqUniqueJobs::Digests.new.delete_by_pattern('*').nil?; end
   end
 
   def down; end
diff --git a/db/post_migrate/20210308133107_remove_subscription_expires_at_from_accounts.rb b/db/post_migrate/20210308133107_remove_subscription_expires_at_from_accounts.rb
new file mode 100644
index 000000000..53e24ef26
--- /dev/null
+++ b/db/post_migrate/20210308133107_remove_subscription_expires_at_from_accounts.rb
@@ -0,0 +1,7 @@
+class RemoveSubscriptionExpiresAtFromAccounts < ActiveRecord::Migration[5.0]
+  def change
+    safety_assured do
+      remove_column :accounts, :subscription_expires_at, :datetime, null: true, default: nil
+    end
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 6f19268e1..4c67353fb 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
 #
 # It's strongly recommended that you check this file into your version control system.
 
-ActiveRecord::Schema.define(version: 2021_02_21_045109) do
+ActiveRecord::Schema.define(version: 2021_03_08_133107) do
 
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
@@ -166,7 +166,6 @@ ActiveRecord::Schema.define(version: 2021_02_21_045109) do
     t.integer "header_file_size"
     t.datetime "header_updated_at"
     t.string "avatar_remote_url"
-    t.datetime "subscription_expires_at"
     t.boolean "locked", default: false, null: false
     t.string "header_remote_url", default: "", null: false
     t.datetime "last_webfingered_at"