From be21d73c72ba572254a39f92656f154926ba150b Mon Sep 17 00:00:00 2001 From: James Elliott Date: Sun, 12 Feb 2023 12:25:15 +1100 Subject: [PATCH] fix: sql migration --- .../migrations/V0008.WebauthnMultiCookieDomain.mysql.up.sql | 3 ++- .../migrations/V0008.WebauthnMultiCookieDomain.postgres.up.sql | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/storage/migrations/V0008.WebauthnMultiCookieDomain.mysql.up.sql b/internal/storage/migrations/V0008.WebauthnMultiCookieDomain.mysql.up.sql index d80ae668a..d7dbcad9e 100644 --- a/internal/storage/migrations/V0008.WebauthnMultiCookieDomain.mysql.up.sql +++ b/internal/storage/migrations/V0008.WebauthnMultiCookieDomain.mysql.up.sql @@ -1,2 +1,3 @@ -DROP INDEX webauthn_devices_lookup_key; +DROP INDEX webauthn_devices_lookup_key ON webauthn_devices; +ALTER TABLE webauthn_devices MODIFY COLUMN rpid VARCHAR(512); CREATE UNIQUE INDEX webauthn_devices_lookup_key ON webauthn_devices (rpid, username, description); diff --git a/internal/storage/migrations/V0008.WebauthnMultiCookieDomain.postgres.up.sql b/internal/storage/migrations/V0008.WebauthnMultiCookieDomain.postgres.up.sql index d80ae668a..c8867a95a 100644 --- a/internal/storage/migrations/V0008.WebauthnMultiCookieDomain.postgres.up.sql +++ b/internal/storage/migrations/V0008.WebauthnMultiCookieDomain.postgres.up.sql @@ -1,2 +1,3 @@ DROP INDEX webauthn_devices_lookup_key; +ALTER TABLE webauthn_devices COLUMN rpid SET DATA TYPE VARCHAR(512); CREATE UNIQUE INDEX webauthn_devices_lookup_key ON webauthn_devices (rpid, username, description);