From 8f760efd4ee9ddae66ad83a1e9bb88c6f5f14566 Mon Sep 17 00:00:00 2001 From: Anirudh Suresh Date: Fri, 10 Jan 2025 10:35:20 +0000 Subject: [PATCH] fix migration permission key svm (#321) --- ...10093007_permission_key_svm_discriminator.down.sql | 11 +++++++++++ ...0110093007_permission_key_svm_discriminator.up.sql | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 auction-server/migrations/20250110093007_permission_key_svm_discriminator.down.sql create mode 100644 auction-server/migrations/20250110093007_permission_key_svm_discriminator.up.sql diff --git a/auction-server/migrations/20250110093007_permission_key_svm_discriminator.down.sql b/auction-server/migrations/20250110093007_permission_key_svm_discriminator.down.sql new file mode 100644 index 00000000..b480c3a7 --- /dev/null +++ b/auction-server/migrations/20250110093007_permission_key_svm_discriminator.down.sql @@ -0,0 +1,11 @@ +UPDATE bid +SET permission_key = SUBSTRING(permission_key FROM 2) +WHERE chain_type = 'svm'; + +UPDATE auction +SET permission_key = SUBSTRING(permission_key FROM 2) +WHERE chain_id = 'svm'; + +UPDATE opportunity +SET permission_key = SUBSTRING(permission_key FROM 2) +WHERE chain_id = 'svm'; diff --git a/auction-server/migrations/20250110093007_permission_key_svm_discriminator.up.sql b/auction-server/migrations/20250110093007_permission_key_svm_discriminator.up.sql new file mode 100644 index 00000000..6ca4d663 --- /dev/null +++ b/auction-server/migrations/20250110093007_permission_key_svm_discriminator.up.sql @@ -0,0 +1,11 @@ +UPDATE bid +SET permission_key = BYTEA '\x00' || permission_key +WHERE chain_type = 'svm'; + +UPDATE auction +SET permission_key = BYTEA '\x00' || permission_key +WHERE chain_id = 'svm'; + +UPDATE opportunity +SET permission_key = BYTEA '\x00' || permission_key +WHERE chain_id = 'svm';