[open-ils-commits] r12104 - trunk/Open-ILS/src/sql/Pg (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Feb 7 21:12:32 EST 2009
Author: miker
Date: 2009-02-07 21:12:31 -0500 (Sat, 07 Feb 2009)
New Revision: 12104
Modified:
trunk/Open-ILS/src/sql/Pg/070.schema.container.sql
Log:
adding note tables for all bucket and item tables; adding pos field for optional ordering of items within a bucket
Modified: trunk/Open-ILS/src/sql/Pg/070.schema.container.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/070.schema.container.sql 2009-02-08 00:28:13 UTC (rev 12103)
+++ trunk/Open-ILS/src/sql/Pg/070.schema.container.sql 2009-02-08 02:12:31 UTC (rev 12104)
@@ -40,6 +40,12 @@
CONSTRAINT cb_name_once_per_owner UNIQUE (owner,name,btype)
);
+CREATE TABLE container.copy_bucket_note (
+ id SERIAL PRIMARY KEY,
+ bucket INT NOT NULL REFERENCES container.copy_bucket (id) ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,
+ note TEXT NOT NULL
+);
+
CREATE TABLE container.copy_bucket_item (
id SERIAL PRIMARY KEY,
bucket INT NOT NULL
@@ -54,9 +60,15 @@
ON UPDATE CASCADE
DEFERRABLE
INITIALLY DEFERRED,
+ pos INT,
create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
+CREATE TABLE container.copy_bucket_item_note (
+ id SERIAL PRIMARY KEY,
+ item INT NOT NULL REFERENCES container.copy_bucket_item (id) ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,
+ note TEXT NOT NULL
+);
@@ -80,6 +92,12 @@
CONSTRAINT cnb_name_once_per_owner UNIQUE (owner,name,btype)
);
+CREATE TABLE container.call_number_bucket_note (
+ id SERIAL PRIMARY KEY,
+ bucket INT NOT NULL REFERENCES container.call_number_bucket (id) ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,
+ note TEXT NOT NULL
+);
+
CREATE TABLE container.call_number_bucket_item (
id SERIAL PRIMARY KEY,
bucket INT NOT NULL
@@ -94,11 +112,19 @@
ON UPDATE CASCADE
DEFERRABLE
INITIALLY DEFERRED,
+ pos INT,
create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
+CREATE TABLE container.call_number_bucket_item_note (
+ id SERIAL PRIMARY KEY,
+ item INT NOT NULL REFERENCES container.call_number_bucket_item (id) ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,
+ note TEXT NOT NULL
+);
+
+
CREATE TABLE container.biblio_record_entry_bucket_type (
code TEXT PRIMARY KEY,
label TEXT NOT NULL UNIQUE
@@ -120,6 +146,12 @@
CONSTRAINT breb_name_once_per_owner UNIQUE (owner,name,btype)
);
+CREATE TABLE container.biblio_record_entry_bucket_note (
+ id SERIAL PRIMARY KEY,
+ bucket INT NOT NULL REFERENCES container.biblio_record_entry_bucket (id) ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,
+ note TEXT NOT NULL
+);
+
CREATE TABLE container.biblio_record_entry_bucket_item (
id SERIAL PRIMARY KEY,
bucket INT NOT NULL
@@ -134,11 +166,18 @@
ON UPDATE CASCADE
DEFERRABLE
INITIALLY DEFERRED,
+ pos INT,
create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
+CREATE TABLE container.biblio_record_entry_bucket_item_note (
+ id SERIAL PRIMARY KEY,
+ item INT NOT NULL REFERENCES container.biblio_record_entry_bucket_item (id) ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,
+ note TEXT NOT NULL
+);
+
CREATE TABLE container.user_bucket_type (
code TEXT PRIMARY KEY,
label TEXT NOT NULL UNIQUE
@@ -159,6 +198,12 @@
CONSTRAINT ub_name_once_per_owner UNIQUE (owner,name,btype)
);
+CREATE TABLE container.user_bucket_note (
+ id SERIAL PRIMARY KEY,
+ bucket INT NOT NULL REFERENCES container.user_bucket (id) ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,
+ note TEXT NOT NULL
+);
+
CREATE TABLE container.user_bucket_item (
id SERIAL PRIMARY KEY,
bucket INT NOT NULL
@@ -173,7 +218,15 @@
ON UPDATE CASCADE
DEFERRABLE
INITIALLY DEFERRED,
+ pos INT,
create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
+CREATE TABLE container.user_bucket_item_note (
+ id SERIAL PRIMARY KEY,
+ item INT NOT NULL REFERENCES container.user_bucket_item (id) ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,
+ note TEXT NOT NULL
+);
+
+
COMMIT;
More information about the open-ils-commits
mailing list