Skip to content

Commit c09a4c7

Browse files
committed
tmp
1 parent 99e068f commit c09a4c7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

nix/ext/001-new-vault.patch

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -965,10 +965,10 @@ index 0000000..e21cb68
965965
+}
966966
diff --git a/sql/supabase_vault--0.2.8--0.3.0.sql b/sql/supabase_vault--0.2.8--0.3.0.sql
967967
new file mode 100644
968-
index 0000000..50bd6e4
968+
index 0000000..cb92b0f
969969
--- /dev/null
970970
+++ b/sql/supabase_vault--0.2.8--0.3.0.sql
971-
@@ -0,0 +1,132 @@
971+
@@ -0,0 +1,134 @@
972972
+CREATE OR REPLACE FUNCTION vault._crypto_aead_det_encrypt(message bytea, additional bytea, key_id bigint, context bytea = 'pgsodium', nonce bytea = NULL)
973973
+RETURNS bytea
974974
+AS 'MODULE_PATHNAME', 'pgsodium_crypto_aead_det_encrypt_by_id'
@@ -994,6 +994,8 @@ index 0000000..50bd6e4
994994
+
995995
+ DROP FUNCTION IF EXISTS vault.secrets_encrypt_secret_secret;
996996
+
997+
+ ALTER TABLE vault.secrets DROP CONSTRAINT IF EXISTS secrets_key_id_fkey;
998+
+
997999
+ IF EXISTS (SELECT FROM vault.secrets) THEN
9981000
+ UPDATE vault.decrypted_secrets s
9991001
+ SET
@@ -1003,12 +1005,11 @@ index 0000000..50bd6e4
10031005
+ key_id := 0,
10041006
+ context := 'pgsodium'::bytea,
10051007
+ nonce := s.nonce
1006-
+ ), 'base64');
1008+
+ ), 'base64'),
1009+
+ key_id = '00000000-0000-0000-0000-000000000000';
10071010
+ END IF;
10081011
+
10091012
+ DROP VIEW IF EXISTS vault.decrypted_secrets;
1010-
+
1011-
+ ALTER TABLE vault.secrets DROP IF EXISTS key_id;
10121013
+END
10131014
+$$;
10141015
+
@@ -1029,6 +1030,7 @@ index 0000000..50bd6e4
10291030
+ ),
10301031
+ 'utf8'::name
10311032
+ ) AS decrypted_secret,
1033+
+ s.key_id,
10321034
+ s.nonce,
10331035
+ s.created_at,
10341036
+ s.updated_at

0 commit comments

Comments
 (0)