8000 chore: bump docker image to v83-rc0 (#349) · asisstan/postgres@ead213a · GitHub
[go: up one dir, main page]

Skip to content

Commit ead213a

Browse files
authored
chore: bump docker image to v83-rc0 (supabase#349)
* chore: bump docker image to v82 * Update test.yml * chore: update schema for latest pg_graphql * chore: disable migration from docker entrypoint
1 parent 782ccd7 commit ead213a

File tree

3 files changed

+71
-11
lines changed

3 files changed

+71
-11
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
strategy:
2525
matrix:
26-
supabase-version: ["14.1.0.71"]
26+
supabase-version: ["14.1.0.83-rc0"]
2727
timeout-minutes: 10
2828

2929
services:
@@ -39,6 +39,9 @@ jobs:
3939
--health-retries 10
4040
env:
4141
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
42+
volumes:
43+
# Disable migration by removing from entrypoint
44+
- /dev/null:/docker-entrypoint-initdb.d/migrate.sh
4245

4346
steps:
4447
- name: checkout

migrations/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: "3.8"
66

77
services:
88
db:
9-
image: supabase/postgres:14.1.0.71
9+
image: supabase/postgres:14.1.0.83-rc0
1010
restart: "no"
1111
ports:
1212
- 5478:5432

migrations/schema.sql

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,10 @@ CREATE SCHEMA extensions;
2424

2525

2626
--
27-
-- Name: pg_graphql; Type: EXTENSION; Schema: -; Owner: -
27+
-- Name: graphql; Type: SCHEMA; Schema: -; Owner: -
2828
--
2929

30-
CREATE EXTENSION IF NOT EXISTS pg_graphql WITH SCHEMA extensions;
31-
32-
33-
--
34-
-- Name: EXTENSION pg_graphql; Type: COMMENT; Schema: -; Owner: -
35-
--
36-
37-
COMMENT ON EXTENSION pg_graphql IS 'GraphQL support';
30+
CREATE SCHEMA graphql;
3831

3932

4033
--
@@ -86,6 +79,20 @@ CREATE SCHEMA realtime;
8679
CREATE SCHEMA storage;
8780

8881

82+
--
83+
-- Name: pg_graphql; Type: EXTENSION; Schema: -; Owner: -
84+
--
85+
86+
CREATE EXTENSION IF NOT EXISTS pg_graphql WITH SCHEMA graphql;
87+
88+
89+
--
90+
-- Name: EXTENSION pg_graphql; Type: COMMENT; Schema: -; Owner: -
91+
--
92+
93+
COMMENT ON EXTENSION pg_graphql IS 'pg_graphql: GraphQL support';
94+
95+
8996
--
9097
-- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: -
9198
--
@@ -482,6 +489,32 @@ END;
482489
$$;
483490

484491

492+
--
493+
-- Name: TABLE key; Type: SECURITY LABEL; Schema: pgsodium; Owner: -
494+
--
495+
496+
SECURITY LABEL FOR pgsodium ON COLUMN pgsodium.key.raw_key IS 'ENCRYPT WITH KEY COLUMN parent_key ASSOCIATED (id, associated_data) NONCE raw_key_nonce';
497+
498+
499+
--
500+
-- Name: key_encrypt_secret(); Type: FUNCTION; Schema: pgsodium; Owner: -
501+
--
502+
503+
CREATE FUNCTION pgsodium.key_encrypt_secret() RETURNS trigger
504+
LANGUAGE plpgsql
505+
AS $$
506+
BEGIN
507+
new.raw_key = CASE WHEN new.parent_key IS NULL THEN NULL ELSE
508+
pgsodium.crypto_aead_det_encrypt(new.raw_key::bytea, pg_catalog.convert_to((new.id::text || new.associated_data::text)::text, 'utf8'),
509+
new.parent_key::uuid,
510+
new.raw_key_nonce
511+
) END
512+
;
513+
RETURN new;
514+
END;
515+
$$;
516+
517+
485518
--
486519
-- Name: extension(text); Type: FUNCTION; Schema: storage; Owner: -
487520
--
@@ -685,6 +718,30 @@ CREATE TABLE auth.users (
685718
COMMENT ON TABLE auth.users IS 'Auth: Stores user login data within a secure schema.';
686719

687720

721+
--
722+
-- Name: decrypted_key; Type: VIEW; Schema: pgsodium; Owner: -
723+
--
724+
725+
CREATE VIEW pgsodium.decrypted_key AS
726+
SELECT key.id,
727+
key.status,
728+
key.created,
729+
key.expires,
730+
key.key_type,
731+
key.key_id,
732+
key.key_context,
733+
key.name,
734+
key.associated_data,
735+
key.raw_key,
736+
CASE
737+
WHEN (key.parent_key IS NULL) THEN NULL::bytea
738+
ELSE pgsodium.crypto_aead_det_decrypt(key.raw_key, convert_to(((key.id)::text || key.associated_data), 'utf8'::name), key.parent_key, key.raw_key_nonce)
739+
END AS decrypted_raw_key,
740+
key.raw_key_nonce,
741+
key.parent_key
742+
FROM pgsodium.key;
743+
744+
688745
--
689746
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
690747
--

0 commit comments

Comments
 (0)
0