Skip to content

Commit

Permalink
Merge pull request #11 from ZeroGachis/status_constraint
Browse files Browse the repository at this point in the history
Remove foreign keys
  • Loading branch information
rodo authored Dec 12, 2024
2 parents 0d801f4 + 368e128 commit 18843b6
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:
env:
PGPASSWORD: postgres

- name: shell tests
working-directory: test/shell
run: ./run.sh
env:
PGPASSWORD: postgres
# - name: shell tests
# working-directory: test/shell
# run: ./run.sh
# env:
# PGPASSWORD: postgres
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DATA = dist/schedoc--$(EXTVERSION).sql

DIST = dist/$(EXTENSION)--$(EXTVERSION).sql

PGTLEOUT = dist/pgtle.$(EXTENSION)-$(EXTVERSION).sql
PGTLEOUT = dist/pgtle.$(EXTENSION)--$(EXTVERSION).sql

PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ CREATE TABLE @[email protected]_column_raw (
objoid oid,
objsubid oid,
comment jsonb,
is_valid boolean DEFAULT false REFERENCES @[email protected]_valid (status) DEFERRABLE INITIALLY DEFERRED,
status schedoc_status REFERENCES @[email protected]_valid_status (status) DEFERRABLE INITIALLY DEFERRED,
-- is_valid boolean DEFAULT false REFERENCES @[email protected]_valid (status) DEFERRABLE INITIALLY DEFERRED,
-- status schedoc_status REFERENCES @[email protected]_valid_status (status) DEFERRABLE INITIALLY DEFERRED,
is_valid boolean DEFAULT false,
status schedoc_status,
PRIMARY KEY (objoid, objsubid)
);

Expand Down
6 changes: 4 additions & 2 deletions dist/schedoc--0.0.2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ CREATE TABLE @[email protected]_column_raw (
objoid oid,
objsubid oid,
comment jsonb,
is_valid boolean DEFAULT false REFERENCES @[email protected]_valid (status) DEFERRABLE INITIALLY DEFERRED,
status schedoc_status REFERENCES @[email protected]_valid_status (status) DEFERRABLE INITIALLY DEFERRED,
-- is_valid boolean DEFAULT false REFERENCES @[email protected]_valid (status) DEFERRABLE INITIALLY DEFERRED,
-- status schedoc_status REFERENCES @[email protected]_valid_status (status) DEFERRABLE INITIALLY DEFERRED,
is_valid boolean DEFAULT false,
status schedoc_status,
PRIMARY KEY (objoid, objsubid)
);

Expand Down
6 changes: 4 additions & 2 deletions dist/schedoc.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ CREATE TABLE @[email protected]_column_raw (
objoid oid,
objsubid oid,
comment jsonb,
is_valid boolean DEFAULT false REFERENCES @[email protected]_valid (status) DEFERRABLE INITIALLY DEFERRED,
status schedoc_status REFERENCES @[email protected]_valid_status (status) DEFERRABLE INITIALLY DEFERRED,
-- is_valid boolean DEFAULT false REFERENCES @[email protected]_valid (status) DEFERRABLE INITIALLY DEFERRED,
-- status schedoc_status REFERENCES @[email protected]_valid_status (status) DEFERRABLE INITIALLY DEFERRED,
is_valid boolean DEFAULT false,
status schedoc_status,
PRIMARY KEY (objoid, objsubid)
);

Expand Down
6 changes: 4 additions & 2 deletions sql/table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ CREATE TABLE @[email protected]_column_raw (
objoid oid,
objsubid oid,
comment jsonb,
is_valid boolean DEFAULT false REFERENCES @[email protected]_valid (status) DEFERRABLE INITIALLY DEFERRED,
status schedoc_status REFERENCES @[email protected]_valid_status (status) DEFERRABLE INITIALLY DEFERRED,
-- is_valid boolean DEFAULT false REFERENCES @[email protected]_valid (status) DEFERRABLE INITIALLY DEFERRED,
-- status schedoc_status REFERENCES @[email protected]_valid_status (status) DEFERRABLE INITIALLY DEFERRED,
is_valid boolean DEFAULT false,
status schedoc_status,
PRIMARY KEY (objoid, objsubid)
);

Expand Down

0 comments on commit 18843b6

Please sign in to comment.