df/bff/db/migration/000003_add_query_table.up.sql
itsscb 6b1f30f0f7 ft/adds table queries
TODO: Add support for multi table requests - currently the existing fields are being merged.
2023-10-17 23:16:31 +02:00

17 lines
327 B
SQL

CREATE TABLE "queries" (
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
"name" varchar NOT NULL,
"query" varchar NOT NULL
);
INSERT INTO "queries" (name, query)
VALUES (
'all_accounts',
'SELECT * FROM accounts'
);
INSERT INTO "queries" (name, query)
VALUES (
'all_persons',
'SELECT * FROM persons'
);