ensure migration actually works
Some checks are pending
ci/woodpecker/push/build-amd64 Pipeline is pending
ci/woodpecker/push/build-arm64 Pipeline is pending
ci/woodpecker/push/docs Pipeline is pending
ci/woodpecker/push/lint Pipeline is pending
ci/woodpecker/push/test Pipeline is pending
ci/woodpecker/pr/build-amd64 Pipeline is pending
ci/woodpecker/pr/build-arm64 Pipeline is pending
ci/woodpecker/pr/docs Pipeline is pending
ci/woodpecker/pr/lint Pipeline is pending
ci/woodpecker/pr/test Pipeline is pending

This commit is contained in:
Floatingghost 2024-10-26 07:51:41 +01:00
parent 9d2c558f64
commit bd64d07082

View file

@ -14,7 +14,7 @@ def up do
Repo.stream(query, timeout: :infinity) Repo.stream(query, timeout: :infinity)
|> Enum.each(fn |> 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 can precompute the public key here...
# we do use it on every user view which makes it a bit of a dos attack vector # we do use it on every user view which makes it a bit of a dos attack vector
# so we should probably cache it # so we should probably cache it
@ -23,6 +23,7 @@ def up do
key = %User.SigningKey{ key = %User.SigningKey{
user_id: user_id, user_id: user_id,
public_key: public_key, public_key: public_key,
key_id: "#{ap_id}#main-key",
private_key: private_key private_key: private_key
} }