about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-03-19 02:43:13 +0100
committerGitHub <noreply@github.com>2021-03-19 02:43:13 +0100
commit9aaaa96d2ff5e27f065375a2544e86afa31a4e13 (patch)
treea31ac84bfcd8b0038ddacd2dfdf9d87a486753d7 /db/migrate
parenta4dcaef53b97c58fd153de6f151b6fada40f3442 (diff)
Use more robust hook for loading timestamp_id function into database (#15919)
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20170920024819_status_ids_to_timestamp_ids.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20170920024819_status_ids_to_timestamp_ids.rb b/db/migrate/20170920024819_status_ids_to_timestamp_ids.rb
index c10aa2c4f..8679f8ece 100644
--- a/db/migrate/20170920024819_status_ids_to_timestamp_ids.rb
+++ b/db/migrate/20170920024819_status_ids_to_timestamp_ids.rb
@@ -1,7 +1,7 @@
 class StatusIdsToTimestampIds < ActiveRecord::Migration[5.1]
   def up
     # Prepare the function we will use to generate IDs.
-    Rake::Task['db:define_timestamp_id'].execute
+    Mastodon::Snowflake.define_timestamp_id
 
     # Set up the statuses.id column to use our timestamp-based IDs.
     ActiveRecord::Base.connection.execute(<<~SQL)
@@ -11,7 +11,7 @@ class StatusIdsToTimestampIds < ActiveRecord::Migration[5.1]
     SQL
 
     # Make sure we have a sequence to use.
-    Rake::Task['db:ensure_id_sequences_exist'].execute
+    Mastodon::Snowflake.ensure_id_sequences_exist
   end
 
   def down