Merged in feature/IO-2950-prod-db-view (pull request #1742)

IO-2950 Add subscription using view instead of variable.

Approved-by: Dave Richer
This commit is contained in:
Patrick Fic
2024-09-19 20:13:06 +00:00
committed by Dave Richer
16 changed files with 165 additions and 16 deletions

View File

@@ -0,0 +1,11 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- CREATE
-- OR REPLACE VIEW "public"."jobs_inproduction" AS
-- SELECT
-- j.id,
-- j.updated_at
-- FROM
-- jobs j
-- WHERE
-- j.inproduction=true;

View File

@@ -0,0 +1,9 @@
CREATE
OR REPLACE VIEW "public"."jobs_inproduction" AS
SELECT
j.id,
j.updated_at
FROM
jobs j
WHERE
j.inproduction=true;

View File

@@ -0,0 +1,8 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- CREATE OR REPLACE VIEW "public"."jobs_inproduction" AS
-- SELECT j.id,
-- j.updated_at,
-- j.shopid
-- FROM jobs j
-- WHERE (j.inproduction = true);

View File

@@ -0,0 +1,6 @@
CREATE OR REPLACE VIEW "public"."jobs_inproduction" AS
SELECT j.id,
j.updated_at,
j.shopid
FROM jobs j
WHERE (j.inproduction = true);

View File

@@ -0,0 +1,8 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- CREATE OR REPLACE VIEW "public"."jobs_inproduction" AS
-- SELECT j.id,
-- j.updated_at,
-- j.shopid
-- FROM jobs j
-- WHERE (j.inproduction = true);

View File

@@ -0,0 +1,6 @@
CREATE OR REPLACE VIEW "public"."jobs_inproduction" AS
SELECT j.id,
j.updated_at,
j.shopid
FROM jobs j
WHERE (j.inproduction = true);

View File

@@ -0,0 +1,3 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- CREATE INDEX idx_jobs_inproduction_true_cast ON jobs(inproduction) WHERE inproduction = ('true') :: boolean;

View File

@@ -0,0 +1 @@
CREATE INDEX idx_jobs_inproduction_true_cast ON jobs(inproduction) WHERE inproduction = ('true') :: boolean;

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_jobs_inproduction_true_cast" on
"public"."jobs" using btree ("inproduction");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_jobs_inproduction_true_cast";