From bd64d070823b8d729f0fa9d445def1a32fbc9af4 Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Sat, 26 Oct 2024 07:51:41 +0100 Subject: [PATCH] ensure migration actually works --- priv/repo/migrations/20240625220752_move_signing_keys.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/priv/repo/migrations/20240625220752_move_signing_keys.exs b/priv/repo/migrations/20240625220752_move_signing_keys.exs index d9ef1acab..9531ceed8 100644 --- a/priv/repo/migrations/20240625220752_move_signing_keys.exs +++ b/priv/repo/migrations/20240625220752_move_signing_keys.exs @@ -14,7 +14,7 @@ def up do Repo.stream(query, timeout: :infinity) |> Enum.each(fn - %User{id: user_id, keys: private_key, local: true} -> + %User{id: user_id, keys: private_key, local: true, ap_id: ap_id} -> # we can precompute the public key here... # we do use it on every user view which makes it a bit of a dos attack vector # so we should probably cache it @@ -23,6 +23,7 @@ def up do key = %User.SigningKey{ user_id: user_id, public_key: public_key, + key_id: "#{ap_id}#main-key", private_key: private_key }