diff options
Diffstat (limited to 'priv')
-rw-r--r-- | priv/repo/migrations/20211218181632_change_object_id_to_flake.exs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/priv/repo/migrations/20211218181632_change_object_id_to_flake.exs b/priv/repo/migrations/20211218181632_change_object_id_to_flake.exs index 117579052..bc6f920b0 100644 --- a/priv/repo/migrations/20211218181632_change_object_id_to_flake.exs +++ b/priv/repo/migrations/20211218181632_change_object_id_to_flake.exs @@ -33,6 +33,13 @@ defmodule Pleroma.Repo.Migrations.ChangeObjectIdToFlake do """ def up do + # Lock tables to avoid a running server meddling with our transaction + execute("LOCK TABLE objects") + execute("LOCK TABLE data_migration_failed_ids") + execute("LOCK TABLE chat_message_references") + execute("LOCK TABLE deliveries") + execute("LOCK TABLE hashtags_objects") + # Switch object IDs to FlakeIds execute(fn -> try do |