Skip to content

Commit eb024da

Browse files
committed
setup for issue #47 #48 #50 #52
1 parent d5fd839 commit eb024da

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

__fixtures__/generated/generated.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21090,6 +21090,10 @@
2109021090
"misc/issues-4.sql": "CREATE TABLE new_style (\n id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,\n val1 TEXT NOT NULL,\n val2 TEXT NULL\n)",
2109121091
"misc/issues-5.sql": "ALTER TABLE new_style ADD CONSTRAINT uq_val1_val2_new UNIQUE NULLS NOT DISTINCT (val1, val2)",
2109221092
"misc/issues-6.sql": "INSERT INTO\n public.people (id, name, epithet, is_great, gender, type_id, date_of_birth, date_of_death, place_of_birth, place_of_death, biography, canonical_status_id, image_url, source_url)\nVALUES\n (1, 'Asterius', 'of Amasea', FALSE, 'M', 1, '0350-01-01', '0410-01-01', 'Cappadocia', 'Amasea', NULL, 1, NULL, NULL),\n (2, 'Ausonius', NULL, FALSE, 'M', 1, '0310-01-01', '0395-01-01', 'Burdigala', NULL, NULL, NULL, NULL, NULL)\nON CONFLICT DO NOTHING",
21093+
"misc/issues-7.sql": "CREATE TABLE public.ci_builds_runner_session (\n id bigint NOT NULL,\n build_id integer NOT NULL,\n url character varying NOT NULL,\n certificate character varying,\n \"authorization\" character varying\n)",
21094+
"misc/issues-8.sql": "COMMENT ON COLUMN public.posts.reply_to_post_number IS 'If this post is a reply to another, this column is the post_number of the post it''s replying to. [FKEY posts.topic_id, posts.post_number]'",
21095+
"misc/issues-9.sql": "CREATE TABLE \"Album\"\n(\n \"AlbumId\" INT NOT NULL,\n \"Title\" VARCHAR(160) NOT NULL,\n \"ArtistId\" INT NOT NULL,\n CONSTRAINT \"PK_Album\" PRIMARY KEY (\"AlbumId\")\n)",
21096+
"misc/issues-10.sql": "CREATE INDEX \"existing_undispatched_message\" ON public.messages USING btree (\"context_id\", context_type, notification_name, \"to\", user_id)",
2109321097
"misc/inflection-1.sql": "CREATE SCHEMA inflection",
2109421098
"misc/inflection-2.sql": "GRANT USAGE ON SCHEMA inflection TO PUBLIC",
2109521099
"misc/inflection-3.sql": "ALTER DEFAULT PRIVILEGES IN SCHEMA inflection \n GRANT EXECUTE ON FUNCTIONS TO PUBLIC",

__fixtures__/kitchen-sink/misc/issues.sql

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,29 @@ INSERT INTO
2424
VALUES
2525
(1, 'Asterius', 'of Amasea', FALSE, 'M', 1, '0350-01-01', '0410-01-01', 'Cappadocia', 'Amasea', NULL, 1, NULL, NULL),
2626
(2, 'Ausonius', NULL, FALSE, 'M', 1, '0310-01-01', '0395-01-01', 'Burdigala', NULL, NULL, NULL, NULL, NULL)
27-
ON CONFLICT DO NOTHING;
27+
ON CONFLICT DO NOTHING;
28+
29+
30+
-- https://github.com/launchql/pgsql-parser/issues/52
31+
CREATE TABLE public.ci_builds_runner_session (
32+
id bigint NOT NULL,
33+
build_id integer NOT NULL,
34+
url character varying NOT NULL,
35+
certificate character varying,
36+
"authorization" character varying
37+
);
38+
39+
-- https://github.com/launchql/pgsql-parser/issues/50
40+
COMMENT ON COLUMN public.posts.reply_to_post_number IS 'If this post is a reply to another, this column is the post_number of the post it''s replying to. [FKEY posts.topic_id, posts.post_number]';
41+
42+
-- https://github.com/launchql/pgsql-parser/issues/48
43+
CREATE TABLE "Album"
44+
(
45+
"AlbumId" INT NOT NULL,
46+
"Title" VARCHAR(160) NOT NULL,
47+
"ArtistId" INT NOT NULL,
48+
CONSTRAINT "PK_Album" PRIMARY KEY ("AlbumId")
49+
);
50+
51+
-- https://github.com/launchql/pgsql-parser/issues/47
52+
CREATE INDEX "existing_undispatched_message" ON public.messages USING btree ("context_id", context_type, notification_name, "to", user_id);

packages/deparser/__tests__/kitchen-sink/misc-issues.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ it('misc-issues', async () => {
99
"misc/issues-3.sql",
1010
"misc/issues-4.sql",
1111
"misc/issues-5.sql",
12-
"misc/issues-6.sql"
12+
"misc/issues-6.sql",
13+
"misc/issues-7.sql",
14+
"misc/issues-8.sql",
15+
"misc/issues-9.sql",
16+
"misc/issues-10.sql"
1317
]);
1418
});

0 commit comments

Comments
 (0)