[open-ils-commits] r9828 - in trunk/Open-ILS: examples src/sql/Pg

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Jun 13 09:40:47 EDT 2008


Author: miker
Date: 2008-06-13 09:40:46 -0400 (Fri, 13 Jun 2008)
New Revision: 9828

Added:
   trunk/Open-ILS/src/sql/Pg/1.2.2.1-1.2.2.2-upgrade-db.sql
   trunk/Open-ILS/src/sql/Pg/extend-reporter.sql
Modified:
   trunk/Open-ILS/examples/fm_IDL.xml
   trunk/Open-ILS/src/sql/Pg/000.english.pg80.fts-config.sql
   trunk/Open-ILS/src/sql/Pg/000.english.pg81.fts-config.sql
   trunk/Open-ILS/src/sql/Pg/000.english.pg82.fts-config.sql
   trunk/Open-ILS/src/sql/Pg/001.schema.offline.sql
   trunk/Open-ILS/src/sql/Pg/002.functions.config.sql
   trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
   trunk/Open-ILS/src/sql/Pg/006.schema.permissions.sql
   trunk/Open-ILS/src/sql/Pg/010.schema.biblio.sql
   trunk/Open-ILS/src/sql/Pg/011.schema.authority.sql
   trunk/Open-ILS/src/sql/Pg/020.schema.functions.sql
   trunk/Open-ILS/src/sql/Pg/030.schema.metabib.sql
   trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql
   trunk/Open-ILS/src/sql/Pg/070.schema.container.sql
   trunk/Open-ILS/src/sql/Pg/080.schema.money.sql
   trunk/Open-ILS/src/sql/Pg/090.schema.action.sql
   trunk/Open-ILS/src/sql/Pg/300.schema.staged_search.sql
   trunk/Open-ILS/src/sql/Pg/500.view.cross-schema.sql
   trunk/Open-ILS/src/sql/Pg/800.fkeys.sql
   trunk/Open-ILS/src/sql/Pg/900.audit-functions.sql
   trunk/Open-ILS/src/sql/Pg/901.audit-tables.sql
   trunk/Open-ILS/src/sql/Pg/example.reporter-extension.sql
   trunk/Open-ILS/src/sql/Pg/reporter-schema.sql
Log:
adding copyright statement headers to the schema definition files; forward porting extend_reporter schema and example

Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/examples/fm_IDL.xml	2008-06-13 13:40:46 UTC (rev 9828)
@@ -3379,6 +3379,19 @@
 		</links>
 	</class>
 
+    <class id="erfcc" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
+        <fields oils_persist:primary="id">
+            <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="Copy ID" name="id" oils_obj:array_position="3" oils_persist:virtual="false" reporter:datatype="int" />
+            <field reporter:label="Total Circulation Count" name="circ_count" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="int" />
+        </fields>
+        <links>
+            <link field="id" reltype="has_a" key="id" map="" class="acp"/>
+        </links>
+    </class>
+
 	<!-- ********************************************************************************************************************* -->
 	<!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
 	<!-- ********************************************************************************************************************* -->

Modified: trunk/Open-ILS/src/sql/Pg/000.english.pg80.fts-config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/000.english.pg80.fts-config.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/000.english.pg80.fts-config.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
 
 BEGIN;
 

Modified: trunk/Open-ILS/src/sql/Pg/000.english.pg81.fts-config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/000.english.pg81.fts-config.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/000.english.pg81.fts-config.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,4 +1,21 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
 
+
 BEGIN;
 
 CREATE OR REPLACE FUNCTION oils_tsearch2 () RETURNS TRIGGER AS $$

Modified: trunk/Open-ILS/src/sql/Pg/000.english.pg82.fts-config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/000.english.pg82.fts-config.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/000.english.pg82.fts-config.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,4 +1,21 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
 
+
 BEGIN;
 
 CREATE OR REPLACE FUNCTION oils_tsearch2 () RETURNS TRIGGER AS $$

Modified: trunk/Open-ILS/src/sql/Pg/001.schema.offline.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/001.schema.offline.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/001.schema.offline.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,4 +1,21 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
 
+
 DROP SCHEMA offline CASCADE;
 
 BEGIN;

Modified: trunk/Open-ILS/src/sql/Pg/002.functions.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.functions.config.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/002.functions.config.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+
 BEGIN;
 
 /*

Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,4 +1,22 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
 
+
+
 DROP SCHEMA stats CASCADE;
 DROP SCHEMA config CASCADE;
 

Modified: trunk/Open-ILS/src/sql/Pg/006.schema.permissions.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/006.schema.permissions.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/006.schema.permissions.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+
 DROP SCHEMA permission CASCADE;
 
 BEGIN;

Modified: trunk/Open-ILS/src/sql/Pg/010.schema.biblio.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/010.schema.biblio.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/010.schema.biblio.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 DROP SCHEMA biblio CASCADE;
 
 BEGIN;

Modified: trunk/Open-ILS/src/sql/Pg/011.schema.authority.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/011.schema.authority.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/011.schema.authority.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 DROP SCHEMA authority CASCADE;
 
 BEGIN;

Modified: trunk/Open-ILS/src/sql/Pg/020.schema.functions.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/020.schema.functions.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/020.schema.functions.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 CREATE OR REPLACE FUNCTION public.non_filing_normalize ( TEXT, "char" ) RETURNS TEXT AS $$
         SELECT  SUBSTRING(
                         REGEXP_REPLACE(

Modified: trunk/Open-ILS/src/sql/Pg/030.schema.metabib.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/030.schema.metabib.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/030.schema.metabib.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 DROP SCHEMA metabib CASCADE;
 
 BEGIN;

Modified: trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 DROP SCHEMA asset CASCADE;
 
 BEGIN;

Modified: trunk/Open-ILS/src/sql/Pg/070.schema.container.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/070.schema.container.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/070.schema.container.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 DROP SCHEMA container CASCADE;
 
 BEGIN;

Modified: trunk/Open-ILS/src/sql/Pg/080.schema.money.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/080.schema.money.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/080.schema.money.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 DROP SCHEMA money CASCADE;
 
 BEGIN;

Modified: trunk/Open-ILS/src/sql/Pg/090.schema.action.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/090.schema.action.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/090.schema.action.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 DROP SCHEMA action CASCADE;
 
 BEGIN;

Added: trunk/Open-ILS/src/sql/Pg/1.2.2.1-1.2.2.2-upgrade-db.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/1.2.2.1-1.2.2.2-upgrade-db.sql	                        (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/1.2.2.1-1.2.2.2-upgrade-db.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+BEGIN;
+
+CREATE SCHEMA extend_reporter;
+
+CREATE TABLE extend_reporter.legcay_circ_count (
+    id          BIGSERIAL   PRIMARY KEY REFERENCES asset.copy (id)
+    circ_count  INT         NOT NULL DEFAULT 0
+);
+
+CREATE VIEW extend_reporter.full_circ_count AS
+ SELECT cp.id, COALESCE(sum(c.circ_count), 0::bigint) + COALESCE(count(circ.id), 0::bigint) AS circ_count
+   FROM asset."copy" cp
+   LEFT JOIN extend_reporter.legcay_circ_count c USING (id)
+   LEFT JOIN "action".circulation circ ON circ.target_copy = c.id
+  GROUP BY cp.id;
+
+COMMIT;
+

Modified: trunk/Open-ILS/src/sql/Pg/300.schema.staged_search.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/300.schema.staged_search.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/300.schema.staged_search.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,4 +1,20 @@
+/*
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
 
+
 DROP SCHEMA search CASCADE;
 
 BEGIN;

Modified: trunk/Open-ILS/src/sql/Pg/500.view.cross-schema.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/500.view.cross-schema.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/500.view.cross-schema.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 BEGIN;
 
 CREATE OR REPLACE VIEW money.open_billable_xact_summary AS

Modified: trunk/Open-ILS/src/sql/Pg/800.fkeys.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/800.fkeys.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/800.fkeys.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Copyright (C) 2008  Laurentian University
+ * Mike Rylander <miker at esilibrary.com> 
+ * Dan Scott <denials at gmail.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 BEGIN;
 
 ALTER TABLE actor.usr ADD CONSTRAINT actor_usr_mailing_address_fkey FOREIGN KEY (mailing_address) REFERENCES actor.usr_address (id) DEFERRABLE INITIALLY DEFERRED;

Modified: trunk/Open-ILS/src/sql/Pg/900.audit-functions.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/900.audit-functions.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/900.audit-functions.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 DROP SCHEMA auditor CASCADE;
 
 BEGIN;

Modified: trunk/Open-ILS/src/sql/Pg/901.audit-tables.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/901.audit-tables.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/901.audit-tables.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 BEGIN;
 
 SELECT auditor.create_auditor ( 'actor', 'usr' );

Modified: trunk/Open-ILS/src/sql/Pg/example.reporter-extension.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/example.reporter-extension.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/example.reporter-extension.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 BEGIN;
 
 CREATE OR REPLACE VIEW reporter.classic_current_circ AS

Added: trunk/Open-ILS/src/sql/Pg/extend-reporter.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/extend-reporter.sql	                        (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/extend-reporter.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+DROP SCHEMA extend_reporter CASCADE;
+
+BEGIN;
+
+CREATE SCHEMA extend_reporter;
+
+CREATE TABLE extend_reporter.legcay_circ_count (
+    id          BIGSERIAL   PRIMARY KEY REFERENCES asset.copy (id)
+    circ_count  INT         NOT NULL DEFAULT 0
+);
+
+CREATE VIEW extend_reporter.full_circ_count AS
+ SELECT cp.id, COALESCE(sum(c.circ_count), 0::bigint) + COALESCE(count(circ.id), 0::bigint) AS circ_count
+   FROM asset."copy" cp
+   LEFT JOIN extend_reporter.legcay_circ_count c USING (id)
+   LEFT JOIN "action".circulation circ ON circ.target_copy = c.id
+  GROUP BY cp.id;
+
+COMMIT;
+

Modified: trunk/Open-ILS/src/sql/Pg/reporter-schema.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/reporter-schema.sql	2008-06-13 13:32:19 UTC (rev 9827)
+++ trunk/Open-ILS/src/sql/Pg/reporter-schema.sql	2008-06-13 13:40:46 UTC (rev 9828)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2007-2008  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com> 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
 DROP SCHEMA reporter CASCADE;
 
 BEGIN;



More information about the open-ils-commits mailing list