relaxing the fkey on hold_request from hold_transit_copy
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 21 Jul 2005 19:49:45 +0000 (19:49 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 21 Jul 2005 19:49:45 +0000 (19:49 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1345 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Postgres/090.schema.action.sql

index b72b865..bbe46a1 100644 (file)
@@ -139,7 +139,7 @@ CREATE TABLE action.hold_copy_map (
 
 CREATE TABLE action.transit_copy (
        id                      SERIAL                          PRIMARY KEY,
-       target_copy             BIGINT                          NOT NULL asset.copy (id) ON DELETE CASCADE,`
+       target_copy             BIGINT                          NOT NULL asset.copy (id) ON DELETE CASCADE,
        source                  INT                             NOT NULL REFERENCES actor.org_unit (id),
        dest                    INT                             NOT NULL REFERENCES actor.org_unit (id),
        persistant_transfer     BOOL                            NOT NULL DEFAULT FALSE,
@@ -149,7 +149,7 @@ CREATE TABLE action.transit_copy (
 );
 
 CREATE TABLE action.hold_transit_copy (
-       hold                    INT                             NOT NULL REFERENCES action.hold_request (id)
+       hold                    INT                             REFERENCES action.hold_request (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED
 ) INHERITS (action.transit_copy);
 
 COMMIT;