fix: ignore views on col/fk as target

Also refactor self relationship findRel logic
This commit is contained in:
steve-chavez
2022-05-16 12:22:24 -05:00
committed by Steve Chavez
parent 2be63b36d6
commit f7b173163c
8 changed files with 144 additions and 93 deletions
+25
View File
@@ -2605,3 +2605,28 @@ CREATE TABLE private.internal_job
CREATE VIEW test.job AS
SELECT j.id, j.parent_id
FROM private.internal_job j;
-- https://github.com/PostgREST/postgrest/issues/2238
CREATE TABLE series (
id bigint PRIMARY KEY,
title text NOT NULL
);
CREATE TABLE adaptation_notifications (
id bigint PRIMARY KEY,
series bigint REFERENCES series(id),
status text
);
CREATE VIEW series_popularity AS
SELECT id, random() AS popularity_score
FROM series;
-- https://github.com/PostgREST/postgrest/issues/1643
CREATE TABLE test.test (
id BIGINT NOT NULL PRIMARY KEY,
parent_id BIGINT CONSTRAINT parent_test REFERENCES test(id)
);
CREATE OR REPLACE VIEW test.view_test AS
SELECT id FROM test.test;