</permacrud>
</class>
+ <class id="ccpbt" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
+ <fields oils_persist:primary="code">
+ <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+ <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+ <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+ <field reporter:label="Code" name="code" oils_obj:array_position="3" oils_persist:virtual="false" reporter:selector="name" reporter:datatype="id"/>
+ <field reporter:label="Label" name="label" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="text" oils_persist:i18n="true"/>
+ </fields>
+ <links/>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create permission="CREATE_COPY_BTYPE" global_required="true"/>
+ <retrieve permission="CREATE_COPY_BTYPE|UPDATE_COPY_BTYPE|DELETE_COPY_BTYPE" global_required="true"/>
+ <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
+ <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
+ </actions>
+ </permacrud>
+ </class>
+
+ <class id="ccnbt" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
+ <fields oils_persist:primary="code">
+ <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+ <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+ <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+ <field reporter:label="Code" name="code" oils_obj:array_position="3" oils_persist:virtual="false" reporter:selector="name" reporter:datatype="id"/>
+ <field reporter:label="Label" name="label" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="text" oils_persist:i18n="true"/>
+ </fields>
+ <links/>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create permission="CREATE_CN_BTYPE" global_required="true"/>
+ <retrieve permission="CREATE_CN_BTYPE|UPDATE_CN_BTYPE|DELETE_CN_BTYPE" global_required="true"/>
+ <update permission="UPDATE_CN_BTYPE" global_required="true"/>
+ <delete permission="DELETE_CN_BTYPE" global_required="true"/>
+ </actions>
+ </permacrud>
+ </class>
+
+ <class id="cbrebt" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
+ <fields oils_persist:primary="code">
+ <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+ <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+ <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+ <field reporter:label="Code" name="code" oils_obj:array_position="3" oils_persist:virtual="false" reporter:selector="name" reporter:datatype="id"/>
+ <field reporter:label="Label" name="label" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="text" oils_persist:i18n="true"/>
+ </fields>
+ <links/>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create permission="CREATE_BIB_BTYPE" global_required="true"/>
+ <retrieve permission="CREATE_BIB_BTYPE|UPDATE_BIB_BTYPE|DELETE_BIB_BTYPE" global_required="true"/>
+ <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
+ <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
+ </actions>
+ </permacrud>
+ </class>
+
+ <class id="cubt" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
+ <fields oils_persist:primary="code">
+ <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+ <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+ <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+ <field reporter:label="Code" name="code" oils_obj:array_position="3" oils_persist:virtual="false" reporter:selector="name" reporter:datatype="id"/>
+ <field reporter:label="Label" name="label" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="text" oils_persist:i18n="true"/>
+ </fields>
+ <links/>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create permission="CREATE_USER_BTYPE" global_required="true"/>
+ <retrieve permission="CREATE_USER_BTYPE|UPDATE_USER_BTYPE|DELETE_USER_BTYPE" global_required="true"/>
+ <update permission="UPDATE_USER_BTYPE" global_required="true"/>
+ <delete permission="DELETE_USER_BTYPE" global_required="true"/>
+ </actions>
+ </permacrud>
+ </class>
+
<class id="cvrfm" controller="open-ils.cstore" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
<fields oils_persist:primary="code">
<field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
BEGIN;
CREATE SCHEMA container;
+CREATE TABLE container.copy_bucket_type (
+ code TEXT PRIMARY KEY,
+ label TEXT NOT NULL UNIQUE
+);
+INSERT INTO container.copy_bucket_type (code,label) VALUES ('misc','Miscellaneous');
+INSERT INTO container.copy_bucket_type (code,label) VALUES ('staff_client','General Staff Client container');
+
CREATE TABLE container.copy_bucket (
id SERIAL PRIMARY KEY,
owner INT NOT NULL
DEFERRABLE
INITIALLY DEFERRED,
name TEXT NOT NULL,
- btype TEXT NOT NULL DEFAULT 'misc',
+ btype TEXT NOT NULL DEFAULT 'misc' REFERENCES container.copy_bucket_type (code),
pub BOOL NOT NULL DEFAULT FALSE,
create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
CONSTRAINT cb_name_once_per_owner UNIQUE (owner,name,btype)
+CREATE TABLE container.call_number_bucket_type (
+ code TEXT PRIMARY KEY,
+ label TEXT NOT NULL UNIQUE
+);
+INSERT INTO container.call_number_bucket_type (code,label) VALUES ('misc','Miscellaneous');
+
CREATE TABLE container.call_number_bucket (
id SERIAL PRIMARY KEY,
owner INT NOT NULL
DEFERRABLE
INITIALLY DEFERRED,
name TEXT NOT NULL,
- btype TEXT NOT NULL DEFAULT 'misc',
+ btype TEXT NOT NULL DEFAULT 'misc' REFERENCES container.call_number_bucket_type (code),
pub BOOL NOT NULL DEFAULT FALSE,
create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
CONSTRAINT cnb_name_once_per_owner UNIQUE (owner,name,btype)
+CREATE TABLE container.biblio_record_entry_bucket_type (
+ code TEXT PRIMARY KEY,
+ label TEXT NOT NULL UNIQUE
+);
+INSERT INTO container.biblio_record_entry_bucket_type (code,label) VALUES ('misc','Miscellaneous');
+INSERT INTO container.biblio_record_entry_bucket_type (code,label) VALUES ('staff_client','General Staff Client container');
+INSERT INTO container.biblio_record_entry_bucket_type (code,label) VALUES ('bookbag','Book Bag');
+
CREATE TABLE container.biblio_record_entry_bucket (
id SERIAL PRIMARY KEY,
DEFERRABLE
INITIALLY DEFERRED,
name TEXT NOT NULL,
- btype TEXT NOT NULL DEFAULT 'misc',
+ btype TEXT NOT NULL DEFAULT 'misc' REFERENCES container.biblio_record_entry_bucket_type (code),
pub BOOL NOT NULL DEFAULT FALSE,
create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
CONSTRAINT breb_name_once_per_owner UNIQUE (owner,name,btype)
+CREATE TABLE container.user_bucket_type (
+ code TEXT PRIMARY KEY,
+ label TEXT NOT NULL UNIQUE
+);
+INSERT INTO container.user_bucket_type (code,label) VALUES ('misc','Miscellaneous');
+INSERT INTO container.user_bucket_type (code,label) VALUES ('folks','Friends');
+INSERT INTO container.user_bucket_type (code,label) VALUES ('folks:pub_book_bags.view','List Published Book Bags');
+INSERT INTO container.user_bucket_type (code,label) VALUES ('folks:pub_book_bags.add','Add to Published Book Bags');
CREATE TABLE container.user_bucket (
id SERIAL PRIMARY KEY,
DEFERRABLE
INITIALLY DEFERRED,
name TEXT NOT NULL,
- btype TEXT NOT NULL DEFAULT 'misc',
+ btype TEXT NOT NULL DEFAULT 'misc' REFERENCES container.user_bucket_type (code),
pub BOOL NOT NULL DEFAULT FALSE,
create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
CONSTRAINT ub_name_once_per_owner UNIQUE (owner,name,btype)