mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
d88e2bbcce
https://github.com/hasura/graphql-engine-mono/pull/1625 Co-authored-by: Sameer Kolhar <6604943+kolharsam@users.noreply.github.com> GitOrigin-RevId: 6b56efc838d2ed1acc44b2847161fde22d6aee17
88 lines
2.8 KiB
YAML
88 lines
2.8 KiB
YAML
# Test output of pg_dump clean output.
|
|
# Including "SET check_function_bodies = false;" avoids https://github.com/hasura/graphql-engine-mono/issues/1007
|
|
descriptions: Execute pg_dump on public schema
|
|
headers:
|
|
X-Hasura-Role: admin
|
|
url: /v1alpha1/pg_dump
|
|
status: 200
|
|
query:
|
|
opts:
|
|
- -O
|
|
- -x
|
|
- --schema-only
|
|
- --schema
|
|
- public
|
|
clean_output: true
|
|
# response on postgres 9.4 and 9.5
|
|
response_9: |
|
|
SET check_function_bodies = false;
|
|
CREATE TABLE public.articles (
|
|
id integer NOT NULL,
|
|
author_id integer NOT NULL,
|
|
title text NOT NULL,
|
|
body text NOT NULL
|
|
);
|
|
CREATE SEQUENCE public.articles_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
ALTER SEQUENCE public.articles_id_seq OWNED BY public.articles.id;
|
|
CREATE TABLE public.authors (
|
|
id integer NOT NULL,
|
|
name text NOT NULL
|
|
);
|
|
CREATE SEQUENCE public.authors_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
ALTER SEQUENCE public.authors_id_seq OWNED BY public.authors.id;
|
|
ALTER TABLE ONLY public.articles ALTER COLUMN id SET DEFAULT nextval('public.articles_id_seq'::regclass);
|
|
ALTER TABLE ONLY public.authors ALTER COLUMN id SET DEFAULT nextval('public.authors_id_seq'::regclass);
|
|
ALTER TABLE ONLY public.articles
|
|
ADD CONSTRAINT articles_pkey PRIMARY KEY (id);
|
|
ALTER TABLE ONLY public.authors
|
|
ADD CONSTRAINT authors_pkey PRIMARY KEY (id);
|
|
ALTER TABLE ONLY public.articles
|
|
ADD CONSTRAINT articles_author_id_fkey FOREIGN KEY (author_id) REFERENCES public.authors(id);
|
|
# response on postgres 10 and 11
|
|
response_10_11: |
|
|
SET check_function_bodies = false;
|
|
CREATE TABLE public.articles (
|
|
id integer NOT NULL,
|
|
author_id integer NOT NULL,
|
|
title text NOT NULL,
|
|
body text NOT NULL
|
|
);
|
|
CREATE SEQUENCE public.articles_id_seq
|
|
AS integer
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
ALTER SEQUENCE public.articles_id_seq OWNED BY public.articles.id;
|
|
CREATE TABLE public.authors (
|
|
id integer NOT NULL,
|
|
name text NOT NULL
|
|
);
|
|
CREATE SEQUENCE public.authors_id_seq
|
|
AS integer
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
ALTER SEQUENCE public.authors_id_seq OWNED BY public.authors.id;
|
|
ALTER TABLE ONLY public.articles ALTER COLUMN id SET DEFAULT nextval('public.articles_id_seq'::regclass);
|
|
ALTER TABLE ONLY public.authors ALTER COLUMN id SET DEFAULT nextval('public.authors_id_seq'::regclass);
|
|
ALTER TABLE ONLY public.articles
|
|
ADD CONSTRAINT articles_pkey PRIMARY KEY (id);
|
|
ALTER TABLE ONLY public.authors
|
|
ADD CONSTRAINT authors_pkey PRIMARY KEY (id);
|
|
ALTER TABLE ONLY public.articles
|
|
ADD CONSTRAINT articles_author_id_fkey FOREIGN KEY (author_id) REFERENCES public.authors(id);
|