[open-ils-commits] r13411 - in trunk/Open-ILS: examples src/sql/Pg (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jun 19 11:56:49 EDT 2009
Author: erickson
Date: 2009-06-19 11:56:47 -0400 (Fri, 19 Jun 2009)
New Revision: 13411
Added:
trunk/Open-ILS/src/sql/Pg/015.schema.staging.sql
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
Log:
adding table sql and IDL entries for the staging schema. schema has multiple applications, including patron imports and an external place to store online account applications
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2009-06-19 14:33:48 UTC (rev 13410)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2009-06-19 15:56:47 UTC (rev 13411)
@@ -4731,7 +4731,78 @@
</permacrud>
</class>
+ <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
+ <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
+ <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
+ <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
+ <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
+ <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
+ <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
+ <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
+ <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
+ <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
+ <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
+ <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
+ <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
+ <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
+ <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
+ <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
+ <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
+ </fields>
+ </class>
+ <class id="stgc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::card_stage" oils_persist:tablename="staging.card_stage" reporter:label="Card Stage">
+ <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
+ <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
+ <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
+ <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
+ <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
+ <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
+ </fields>
+ </class>
+
+ <class id="stgma" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::mailing_address_stage" oils_persist:tablename="staging.mailing_address_stage" reporter:label="Mailing Address Stage">
+ <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
+ <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
+ <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
+ <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
+ <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
+ <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
+ <field reporter:label="City" name="city" reporter:datatype="text"/>
+ <field reporter:label="State" name="state" reporter:datatype="text"/>
+ <field reporter:label="Country" name="country" reporter:datatype="text"/>
+ <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
+ <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
+ </fields>
+ </class>
+
+ <class id="stgba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::billing_address_stage" oils_persist:tablename="staging.billing_address_stage" reporter:label="Billing Address Stage">
+ <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
+ <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
+ <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
+ <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
+ <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
+ <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
+ <field reporter:label="City" name="city" reporter:datatype="text"/>
+ <field reporter:label="State" name="state" reporter:datatype="text"/>
+ <field reporter:label="Country" name="country" reporter:datatype="text"/>
+ <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
+ <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
+ </fields>
+ </class>
+
+ <class id="stgsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::statcat_stage" oils_persist:tablename="staging.statcat_stage" reporter:label="Statistical Category Stage">
+ <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
+ <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
+ <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
+ <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
+ <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
+ <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
+ <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
+ </fields>
+ </class>
+
+
<!-- ********************************************************************************************************************* -->
<!-- What follows is a set of example extensions that are useful for PINES. Comment out or remove if you don't want them. -->
<!-- ********************************************************************************************************************* -->
Added: trunk/Open-ILS/src/sql/Pg/015.schema.staging.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/015.schema.staging.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/015.schema.staging.sql 2009-06-19 15:56:47 UTC (rev 13411)
@@ -0,0 +1,60 @@
+DROP SCHEMA staging CASCADE;
+
+BEGIN;
+
+CREATE SCHEMA staging;
+
+CREATE TABLE staging.user_stage (
+ row_id BIGSERIAL PRIMARY KEY,
+ row_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ usrname TEXT NOT NULL,
+ profile TEXT,
+ email TEXT,
+ passwd TEXT,
+ ident_type INT DEFAULT 3,
+ first_given_name TEXT,
+ second_given_name TEXT,
+ family_name TEXT,
+ day_phone TEXT,
+ evening_phone TEXT,
+ home_ou INT DEFAULT 2,
+ dob TEXT,
+ complete BOOL DEFAULT FALSE
+);
+
+CREATE TABLE staging.card_stage ( -- for new library barcodes
+ row_id BIGSERIAL PRIMARY KEY,
+ row_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ usrname TEXT NOT NULL,
+ barcode TEXT NOT NULL,
+ complete BOOL DEFAULT FALSE
+);
+
+CREATE TABLE staging.mailing_address_stage (
+ row_id BIGSERIAL PRIMARY KEY,
+ row_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ usrname TEXT NOT NULL, -- user's SIS barcode, for linking
+ street1 TEXT,
+ street2 TEXT,
+ city TEXT NOT NULL DEFAULT '',
+ state TEXT NOT NULL DEFAULT 'OK',
+ country TEXT NOT NULL DEFAULT 'US',
+ post_code TEXT NOT NULL,
+ complete BOOL DEFAULT FALSE
+);
+
+CREATE TABLE staging.billing_address_stage (
+ LIKE staging.mailing_address_stage INCLUDING DEFAULTS
+);
+
+CREATE TABLE staging.statcat_stage (
+ row_id BIGSERIAL PRIMARY KEY,
+ row_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ usrname TEXT NOT NULL,
+ statcat TEXT NOT NULL, -- for things like 'Year of study'
+ value TEXT NOT NULL, -- and the value, such as 'Freshman'
+ complete BOOL DEFAULT FALSE
+);
+
+COMMIT;
+
More information about the open-ils-commits
mailing list