@@ -45,27 +45,6 @@ CREATE SCHEMA graphql_public;
4545CREATE SCHEMA pgbouncer ;
4646
4747
48- --
49- -- Name: pgsodium; Type: SCHEMA; Schema: -; Owner: -
50- --
51-
52- CREATE SCHEMA pgsodium ;
53-
54-
55- --
56- -- Name: pgsodium; Type: EXTENSION; Schema: -; Owner: -
57- --
58-
59- CREATE EXTENSION IF NOT EXISTS pgsodium WITH SCHEMA pgsodium;
60-
61-
62- --
63- -- Name: EXTENSION pgsodium; Type: COMMENT; Schema: -; Owner: -
64- --
65-
66- COMMENT ON EXTENSION pgsodium IS ' Pgsodium is a modern cryptography library for Postgres.' ;
67-
68-
6948--
7049-- Name: realtime; Type: SCHEMA; Schema: -; Owner: -
7150--
569548$$;
570549
571550
572- --
573- -- Name: secrets_encrypt_secret_secret(); Type: FUNCTION; Schema: vault; Owner: -
574- --
575-
576- CREATE FUNCTION vault .secrets_encrypt_secret_secret() RETURNS trigger
577- LANGUAGE plpgsql
578- AS $$
579- BEGIN
580- new .secret = CASE WHEN new .secret IS NULL THEN NULL ELSE
581- CASE WHEN new .key_id IS NULL THEN NULL ELSE pg_catalog .encode (
582- pgsodium .crypto_aead_det_encrypt (
583- pg_catalog .convert_to (new .secret , ' utf8' ),
584- pg_catalog .convert_to ((new .id ::text || new .description ::text || new .created_at ::text || new .updated_at ::text )::text , ' utf8' ),
585- new .key_id ::uuid,
586- new .nonce
587- ),
588- ' base64' ) END END;
589- RETURN new;
590- END;
591- $$;
592-
593-
594551SET default_tablespace = ' ' ;
595552
596553SET default_table_access_method = heap;
@@ -777,30 +734,6 @@ CREATE TABLE storage.objects (
777734);
778735
779736
780- --
781- -- Name: decrypted_secrets; Type: VIEW; Schema: vault; Owner: -
782- --
783-
784- CREATE VIEW vault .decrypted_secrets AS
785- SELECT id,
786- name,
787- description,
788- secret,
789- CASE
790- WHEN (secret IS NULL ) THEN NULL ::text
791- ELSE
792- CASE
793- WHEN (key_id IS NULL ) THEN NULL ::text
794- ELSE convert_from(pgsodium .crypto_aead_det_decrypt (decode(secret, ' base64' ::text ), convert_to(((((id)::text || description) || (created_at)::text ) || (updated_at)::text ), ' utf8' ::name), key_id, nonce), ' utf8' ::name)
795- END
796- END AS decrypted_secret,
797- key_id,
798- nonce,
799- created_at,
800- updated_at
801- FROM vault .secrets ;
802-
803-
804737--
805738-- Name: refresh_tokens id; Type: DEFAULT; Schema: auth; Owner: -
806739--
0 commit comments