age protection stuff
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Jun 2006 16:39:54 +0000 (16:39 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Jun 2006 16:39:54 +0000 (16:39 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4745 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/040.schema.asset.sql

index 697afac..a138649 100644 (file)
@@ -18,22 +18,23 @@ CREATE TABLE asset.copy (
        id              BIGSERIAL                       PRIMARY KEY,
        circ_lib        INT                             NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
        creator         BIGINT                          NOT NULL,
-       create_date     TIMESTAMP WITH TIME ZONE        DEFAULT NOW(),
+       call_number     BIGINT                          NOT NULL,
        editor          BIGINT                          NOT NULL,
+       create_date     TIMESTAMP WITH TIME ZONE        DEFAULT NOW(),
        edit_date       TIMESTAMP WITH TIME ZONE        DEFAULT NOW(),
-       barcode         TEXT                            UNIQUE NOT NULL,
-       call_number     BIGINT                          NOT NULL,
        copy_number     INT,
-       holdable        BOOL                            NOT NULL DEFAULT TRUE,
        status          INT                             NOT NULL DEFAULT 0 REFERENCES config.copy_status (id) DEFERRABLE INITIALLY DEFERRED,
        location        INT                             NOT NULL DEFAULT 1 REFERENCES asset.copy_location (id) DEFERRABLE INITIALLY DEFERRED,
        loan_duration   INT                             NOT NULL CHECK ( loan_duration IN (1,2,3) ),
        fine_level      INT                             NOT NULL CHECK ( fine_level IN (1,2,3) ),
+       age_protect     INT,
        circulate       BOOL                            NOT NULL DEFAULT TRUE,
        deposit         BOOL                            NOT NULL DEFAULT FALSE,
+       ref             BOOL                            NOT NULL DEFAULT FALSE,
+       holdable        BOOL                            NOT NULL DEFAULT TRUE,
        deposit_amount  NUMERIC(6,2)                    NOT NULL DEFAULT 0.00,
        price           NUMERIC(8,2)                    NOT NULL DEFAULT 0.00,
-       ref             BOOL                            NOT NULL DEFAULT FALSE,
+       barcode         TEXT                            UNIQUE NOT NULL,
        circ_modifier   TEXT,
        circ_as_type    TEXT,
        dummy_title     TEXT,