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

Feature/IO-2950 prod db view
This commit is contained in:
Dave Richer
2024-09-19 20:28:51 +00:00
16 changed files with 165 additions and 16 deletions

View File

@@ -4359,6 +4359,35 @@
template_engine: Kriti
url: '{{$base_url}}/opensearch'
version: 2
- table:
name: jobs_inproduction
schema: public
object_relationships:
- name: bodyshop
using:
manual_configuration:
column_mapping:
shopid: id
insertion_order: null
remote_table:
name: bodyshops
schema: public
select_permissions:
- role: user
permission:
columns:
- id
- shopid
- updated_at
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
- table:
name: masterdata
schema: public

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";