[open-ils-commits] r20164 - branches/rel_2_1/Open-ILS/src/sql/Pg (gmc)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 18 11:43:38 EDT 2011
Author: gmc
Date: 2011-04-18 11:43:36 -0400 (Mon, 18 Apr 2011)
New Revision: 20164
Modified:
branches/rel_2_1/Open-ILS/src/sql/Pg/002.schema.config.sql
branches/rel_2_1/Open-ILS/src/sql/Pg/005.schema.actors.sql
branches/rel_2_1/Open-ILS/src/sql/Pg/008.schema.query.sql
branches/rel_2_1/Open-ILS/src/sql/Pg/020.schema.functions.sql
branches/rel_2_1/Open-ILS/src/sql/Pg/090.schema.action.sql
branches/rel_2_1/Open-ILS/src/sql/Pg/200.schema.acq.sql
branches/rel_2_1/Open-ILS/src/sql/Pg/999.functions.global.sql
Log:
minor improvements to database object comments
* remove copyright, license verbiage, and C-style comment marking
from the comments; these can live in the SQL scripts
* updated several copyright headers
* minor improvements to documentation of a couple tables
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
Modified: branches/rel_2_1/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- branches/rel_2_1/Open-ILS/src/sql/Pg/002.schema.config.sql 2011-04-18 15:43:34 UTC (rev 20163)
+++ branches/rel_2_1/Open-ILS/src/sql/Pg/002.schema.config.sql 2011-04-18 15:43:36 UTC (rev 20164)
@@ -1,7 +1,11 @@
/*
* Copyright (C) 2004-2008 Georgia Public Library Service
- * Copyright (C) 2008 Equinox Software, Inc.
+ * Copyright (C) 2008-2011 Equinox Software, Inc.
* Mike Rylander <miker at esilibrary.com>
+ * Copyright (C) 2010 Merrimack Valley Library Consortium
+ * Jason Stephenson <jstephenson at mvlc.org>
+ * Copyright (C) 2010 Laurentian University
+ * Dan Scott <dscott at laurentian.ca>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -25,25 +29,8 @@
CREATE SCHEMA config;
COMMENT ON SCHEMA config IS $$
-/*
- * Copyright (C) 2005 Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * The config schema holds static configuration data for the
- * Open-ILS installation.
- *
- * ****
- *
- * 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.
- */
+The config schema holds static configuration data for the
+Evergreen installation.
$$;
CREATE TABLE config.internal_flag (
@@ -79,27 +66,10 @@
transcendant BOOL NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE config.bib_source IS $$
-/*
- * Copyright (C) 2005 Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Valid sources of MARC records
- *
- * This is table is used to set up the relative "quality" of each
- * MARC source, such as OCLC.
- *
- * ****
- *
- * 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.
- */
+This is table is used to set up the relative "quality" of each
+MARC source, such as OCLC. Also identifies "transcendant" sources,
+i.e., sources of bib records that should display in the OPAC
+even if no copies or located URIs are attached.
$$;
CREATE TABLE config.standing (
@@ -107,29 +77,12 @@
value TEXT NOT NULL UNIQUE
);
COMMENT ON TABLE config.standing IS $$
-/*
- * Copyright (C) 2005 Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Patron Standings
- *
- * This table contains the values that can be applied to a patron
- * by a staff member. These values should not be changed, other
- * than for translation, as the ID column is currently a "magic
- * number" in the source. :(
- *
- * ****
- *
- * 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.
- */
+Patron Standings
+
+This table contains the values that can be applied to a patron
+by a staff member. These values should not be changed, other
+than for translation, as the ID column is currently a "magic
+number" in the source. :(
$$;
CREATE TABLE config.standing_penalty (
@@ -218,29 +171,12 @@
facet_xpath TEXT
);
COMMENT ON TABLE config.metabib_field IS $$
-/*
- * Copyright (C) 2005 Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * XPath used for record indexing ingest
- *
- * This table contains the XPath used to chop up MODS into its
- * indexable parts. Each XPath entry is named and assigned to
- * a "class" of either title, subject, author, keyword or series.
- *
- *
- * ****
- *
- * 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.
- */
+XPath used for record indexing ingest
+
+This table contains the XPath used to chop up MODS into its
+indexable parts. Each XPath entry is named and assigned to
+a "class" of either title, subject, author, keyword, series
+or identifier.
$$;
CREATE UNIQUE INDEX config_metabib_field_class_name_idx ON config.metabib_field (field_class, name);
@@ -260,25 +196,7 @@
CONSTRAINT noncat_once_per_lib UNIQUE (owning_lib,name)
);
COMMENT ON TABLE config.non_cataloged_type IS $$
-/*
- * Copyright (C) 2005 Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Types of valid non-cataloged items.
- *
- *
- * ****
- *
- * 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.
- */
+Types of valid non-cataloged items.
$$;
CREATE TABLE config.identification_type (
@@ -286,28 +204,10 @@
name TEXT NOT NULL UNIQUE
);
COMMENT ON TABLE config.identification_type IS $$
-/*
- * Copyright (C) 2005 Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Types of valid patron identification.
- *
- * Each patron must display at least one valid form of identification
- * in order to get a library card. This table lists those forms.
- *
- *
- * ****
- *
- * 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.
- */
+Types of valid patron identification.
+
+Each patron must display at least one valid form of identification
+in order to get a library card. This table lists those forms.
$$;
CREATE TABLE config.rule_circ_duration (
@@ -319,27 +219,9 @@
max_renewals INT NOT NULL
);
COMMENT ON TABLE config.rule_circ_duration IS $$
-/*
- * Copyright (C) 2005 Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Circulation Duration rules
- *
- * Each circulation is given a duration based on one of these rules.
- *
- *
- * ****
- *
- * 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.
- */
+Circulation Duration rules
+
+Each circulation is given a duration based on one of these rules.
$$;
CREATE TABLE config.hard_due_date (
@@ -390,28 +272,10 @@
is_percent BOOL NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE config.rule_max_fine IS $$
-/*
- * Copyright (C) 2005 Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Circulation Max Fine rules
- *
- * Each circulation is given a maximum fine based on one of
- * these rules.
- *
- *
- * ****
- *
- * 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.
- */
+Circulation Max Fine rules
+
+Each circulation is given a maximum fine based on one of
+these rules.
$$;
CREATE TABLE config.rule_recurring_fine (
@@ -424,30 +288,12 @@
grace_period INTERVAL NOT NULL DEFAULT '1 day'::INTERVAL
);
COMMENT ON TABLE config.rule_recurring_fine IS $$
-/*
- * Copyright (C) 2005 Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Circulation Recurring Fine rules
- *
- * Each circulation is given a recurring fine amount based on one of
- * these rules. The recurrence_interval should not be any shorter
- * than the interval between runs of the fine_processor.pl script
- * (which is run from CRON), or you could miss fines.
- *
- *
- * ****
- *
- * 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.
- */
+Circulation Recurring Fine rules
+
+Each circulation is given a recurring fine amount based on one of
+these rules. The recurrence_interval should not be any shorter
+than the interval between runs of the fine_processor.pl script
+(which is run from CRON), or you could miss fines.
$$;
@@ -458,31 +304,13 @@
prox INT NOT NULL
);
COMMENT ON TABLE config.rule_age_hold_protect IS $$
-/*
- * Copyright (C) 2005 Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Hold Item Age Protection rules
- *
- * A hold request can only capture new(ish) items when they are
- * within a particular proximity of the home_ou of the requesting
- * user. The proximity ('prox' column) is calculated by counting
- * the number of tree edges between the user's home_ou and the owning_lib
- * of the copy that could fulfill the hold.
- *
- *
- * ****
- *
- * 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.
- */
+Hold Item Age Protection rules
+
+A hold request can only capture new(ish) items when they are
+within a particular proximity of the home_ou of the requesting
+user. The proximity ('prox' column) is calculated by counting
+the number of tree edges between the user's home_ou and the owning_lib
+of the copy that could fulfill the hold.
$$;
CREATE TABLE config.copy_status (
@@ -492,38 +320,21 @@
opac_visible BOOL NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE config.copy_status IS $$
-/*
- * Copyright (C) 2005 Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Copy Statuses
- *
- * The available copy statuses, and whether a copy in that
- * status is available for hold request capture. 0 (zero) is
- * the only special number in this set, meaning that the item
- * is available for immediate checkout, and is counted as available
- * in the OPAC.
- *
- * Statuses with an ID below 100 are not removable, and have special
- * meaning in the code. Do not change them except to translate the
- * textual name.
- *
- * You may add and remove statuses above 100, and these can be used
- * to remove items from normal circulation without affecting the rest
- * of the copy's values or its location.
- *
- * ****
- *
- * 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.
- */
+Copy Statuses
+
+The available copy statuses, and whether a copy in that
+status is available for hold request capture. 0 (zero) is
+the only special number in this set, meaning that the item
+is available for immediate checkout, and is counted as available
+in the OPAC.
+
+Statuses with an ID below 100 are not removable, and have special
+meaning in the code. Do not change them except to translate the
+textual name.
+
+You may add and remove statuses above 100, and these can be used
+to remove items from normal circulation without affecting the rest
+of the copy's values or its location.
$$;
CREATE TABLE config.net_access_level (
@@ -531,27 +342,10 @@
name TEXT NOT NULL UNIQUE
);
COMMENT ON TABLE config.net_access_level IS $$
-/*
- * Copyright (C) 2005 Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Patron Network Access level
- *
- * This will be used to inform the in-library firewall of how much
- * internet access the using patron should be allowed.
- *
- * ****
- *
- * 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.
- */
+Patron Network Access level
+
+This will be used to inform the in-library firewall of how much
+internet access the using patron should be allowed.
$$;
@@ -808,15 +602,10 @@
$func$ LANGUAGE PLPERLU;
COMMENT ON FUNCTION public.force_to_isbn13(TEXT) IS $$
-/*
- * Copyright (C) 2011 Equinox Software
- * Mike Rylander <mrylander at gmail.com>
- *
- * Inspired by translate_isbn1013
- *
- * The force_to_isbn13 function takes an input ISBN and returns the ISBN13
- * version without hypens and with a repaired checksum if the checksum was bad
- */
+Inspired by translate_isbn1013
+
+The force_to_isbn13 function takes an input ISBN and returns the ISBN13
+version without hypens and with a repaired checksum if the checksum was bad
$$;
@@ -860,18 +649,11 @@
$func$ LANGUAGE PLPERLU;
COMMENT ON FUNCTION public.translate_isbn1013(TEXT) IS $$
-/*
- * Copyright (C) 2010 Merrimack Valley Library Consortium
- * Jason Stephenson <jstephenson at mvlc.org>
- * Copyright (C) 2010 Laurentian University
- * Dan Scott <dscott at laurentian.ca>
- *
- * The translate_isbn1013 function takes an input ISBN and returns the
- * following in a single space-delimited string if the input ISBN is valid:
- * - The normalized input ISBN (hyphens stripped)
- * - The normalized input ISBN with a fixed checksum if the checksum was bad
- * - The ISBN converted to its ISBN10 or ISBN13 counterpart, if possible
- */
+The translate_isbn1013 function takes an input ISBN and returns the
+following in a single space-delimited string if the input ISBN is valid:
+ - The normalized input ISBN (hyphens stripped)
+ - The normalized input ISBN with a fixed checksum if the checksum was bad
+ - The ISBN converted to its ISBN10 or ISBN13 counterpart, if possible
$$;
-- And ... a table in which to register them
Modified: branches/rel_2_1/Open-ILS/src/sql/Pg/005.schema.actors.sql
===================================================================
--- branches/rel_2_1/Open-ILS/src/sql/Pg/005.schema.actors.sql 2011-04-18 15:43:34 UTC (rev 20163)
+++ branches/rel_2_1/Open-ILS/src/sql/Pg/005.schema.actors.sql 2011-04-18 15:43:36 UTC (rev 20164)
@@ -1,18 +1,9 @@
-DROP SCHEMA IF EXISTS actor CASCADE;
-
-BEGIN;
-CREATE SCHEMA actor;
-COMMENT ON SCHEMA actor IS $$
/*
* Copyright (C) 2005-2008 Equinox Software, Inc. / Georgia Public Library Service
* Mike Rylander <mrylander at gmail.com>
+ * Copyright (C) 2010 Laurentian University
+ * Dan Scott <dscott at laurentian.ca>
*
- * Schema: actor
- *
- * Holds all tables pertaining to users and libraries (org units).
- *
- * ****
- *
* 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
@@ -23,6 +14,13 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
+
+DROP SCHEMA IF EXISTS actor CASCADE;
+
+BEGIN;
+CREATE SCHEMA actor;
+COMMENT ON SCHEMA actor IS $$
+Holds all tables pertaining to users and libraries (org units).
$$;
CREATE TABLE actor.usr (
@@ -68,28 +66,11 @@
claims_never_checked_out_count INT NOT NULL DEFAULT 0
);
COMMENT ON TABLE actor.usr IS $$
-/*
- * Copyright (C) 2005-2008 Equinox Software, Inc. / Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * User objects
- *
- * This table contains the core User objects that describe both
- * staff members and patrons. The difference between the two
- * types of users is based on the user's permissions.
- *
- * ****
- *
- * 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.
- */
+User objects
+
+This table contains the core User objects that describe both
+staff members and patrons. The difference between the two
+types of users is based on the user's permissions.
$$;
CREATE INDEX actor_usr_home_ou_idx ON actor.usr (home_ou);
@@ -156,27 +137,10 @@
CONSTRAINT usr_once_per_key UNIQUE (usr,name)
);
COMMENT ON TABLE actor.usr_setting IS $$
-/*
- * Copyright (C) 2005-2008 Equinox Software, Inc. / Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * User settings
- *
- * This table contains any arbitrary settings that a client
- * program would like to save for a user.
- *
- * ****
- *
- * 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.
- */
+User settings
+
+This table contains any arbitrary settings that a client
+program would like to save for a user.
$$;
CREATE INDEX actor_usr_setting_usr_idx ON actor.usr_setting (usr);
@@ -191,27 +155,10 @@
CONSTRAINT sc_once_per_owner UNIQUE (owner,name)
);
COMMENT ON TABLE actor.stat_cat IS $$
-/*
- * Copyright (C) 2005-2008 Equinox Software, Inc. / Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * User Statistical Catagories
- *
- * Local data collected about Users is placed into a Statistical
- * Catagory. Here's where those catagories are defined.
- *
- * ****
- *
- * 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.
- */
+User Statistical Catagories
+
+Local data collected about Users is placed into a Statistical
+Catagory. Here's where those catagories are defined.
$$;
@@ -223,29 +170,11 @@
CONSTRAINT sce_once_per_owner UNIQUE (stat_cat,owner,value)
);
COMMENT ON TABLE actor.stat_cat_entry IS $$
-/*
- * Copyright (C) 2005-2008 Equinox Software, Inc. / Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * User Statistical Catagory Entries
- *
- * Local data collected about Users is placed into a Statistical
- * Catagory. Each library can create entries into any of its own
- * stat_cats, its ancestors' stat_cats, or its descendants' stat_cats.
- *
- *
- * ****
- *
- * 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.
- */
+User Statistical Catagory Entries
+
+Local data collected about Users is placed into a Statistical
+Catagory. Each library can create entries into any of its own
+stat_cats, its ancestors' stat_cats, or its descendants' stat_cats.
$$;
@@ -257,27 +186,9 @@
CONSTRAINT sc_once_per_usr UNIQUE (target_usr,stat_cat)
);
COMMENT ON TABLE actor.stat_cat_entry_usr_map IS $$
-/*
- * Copyright (C) 2005-2008 Equinox Software, Inc. / Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Statistical Catagory Entry to User map
- *
- * Records the stat_cat entries for each user.
- *
- *
- * ****
- *
- * 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.
- */
+Statistical Catagory Entry to User map
+
+Records the stat_cat entries for each user.
$$;
CREATE INDEX actor_stat_cat_entry_usr_idx ON actor.stat_cat_entry_usr_map (target_usr);
@@ -289,30 +200,12 @@
active BOOL NOT NULL DEFAULT TRUE
);
COMMENT ON TABLE actor.card IS $$
-/*
- * Copyright (C) 2005-2008 Equinox Software, Inc. / Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Library Cards
- *
- * Each User has one or more library cards. The current "main"
- * card is linked to here from the actor.usr table, and it is up
- * to the consortium policy whether more than one card can be
- * active for any one user at a given time.
- *
- *
- * ****
- *
- * 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.
- */
+Library Cards
+
+Each User has one or more library cards. The current "main"
+card is linked to here from the actor.usr table, and it is up
+to the consortium policy whether more than one card can be
+active for any one user at a given time.
$$;
CREATE INDEX actor_card_usr_idx ON actor.card (usr);
@@ -470,27 +363,10 @@
CONSTRAINT ou_once_per_key UNIQUE (org_unit,name)
);
COMMENT ON TABLE actor.org_unit_setting IS $$
-/*
- * Copyright (C) 2005-2008 Equinox Software, Inc. / Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * Org Unit settings
- *
- * This table contains any arbitrary settings that a client
- * program would like to save for an org unit.
- *
- * ****
- *
- * 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.
- */
+Org Unit settings
+
+This table contains any arbitrary settings that a client
+program would like to save for an org unit.
$$;
CREATE INDEX actor_org_unit_setting_usr_idx ON actor.org_unit_setting (org_unit);
@@ -530,24 +406,7 @@
has_been_reset BOOL NOT NULL DEFAULT false
);
COMMENT ON TABLE actor.usr_password_reset IS $$
-/*
- * Copyright (C) 2010 Laurentian University
- * Dan Scott <dscott at laurentian.ca>
- *
- * Self-serve password reset requests
- *
- * ****
- *
- * 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.
- */
+Self-serve password reset requests
$$;
CREATE UNIQUE INDEX actor_usr_password_reset_uuid_idx ON actor.usr_password_reset (uuid);
CREATE INDEX actor_usr_password_reset_usr_idx ON actor.usr_password_reset (usr);
@@ -586,24 +445,7 @@
note TEXT
);
COMMENT ON TABLE actor.usr_standing_penalty IS $$
-/*
- * Copyright (C) 2005-2008 Equinox Software, Inc. / Georgia Public Library Service
- * Mike Rylander <mrylander at gmail.com>
- *
- * User standing penalties
- *
- * ****
- *
- * 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.
- */
+User standing penalties
$$;
CREATE INDEX actor_usr_standing_penalty_usr_idx ON actor.usr_standing_penalty (usr);
Modified: branches/rel_2_1/Open-ILS/src/sql/Pg/008.schema.query.sql
===================================================================
--- branches/rel_2_1/Open-ILS/src/sql/Pg/008.schema.query.sql 2011-04-18 15:43:34 UTC (rev 20163)
+++ branches/rel_2_1/Open-ILS/src/sql/Pg/008.schema.query.sql 2011-04-18 15:43:36 UTC (rev 20164)
@@ -1,21 +1,7 @@
--- Script to create the query schema and the tables therein
-
-BEGIN;
-
-DROP SCHEMA IF EXISTS query CASCADE;
-CREATE SCHEMA query;
-COMMENT ON SCHEMA actor IS $$
/*
* Copyright (C) 2009 Equinox Software, Inc. / Georgia Public Library Service
* Scott McKellar <scott at esilibrary.com>
*
- * Schema: query
- *
- * Contains tables designed to represent user-defined queries for
- * reports and the like.
- *
- * ****
- *
* 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
@@ -26,6 +12,14 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
+
+BEGIN;
+
+DROP SCHEMA IF EXISTS query CASCADE;
+CREATE SCHEMA query;
+COMMENT ON SCHEMA query IS $$
+Contains tables designed to represent user-defined queries for
+reports and the like.
$$;
CREATE TABLE query.stored_query (
Modified: branches/rel_2_1/Open-ILS/src/sql/Pg/020.schema.functions.sql
===================================================================
--- branches/rel_2_1/Open-ILS/src/sql/Pg/020.schema.functions.sql 2011-04-18 15:43:34 UTC (rev 20163)
+++ branches/rel_2_1/Open-ILS/src/sql/Pg/020.schema.functions.sql 2011-04-18 15:43:36 UTC (rev 20164)
@@ -323,10 +323,8 @@
$$ LANGUAGE plpgsql STABLE ROWS 1;
COMMENT ON FUNCTION actor.org_unit_ancestor_setting( TEXT, INT) IS $$
-/**
-* Search "up" the org_unit tree until we find the first occurrence of an
-* org_unit_setting with the given name.
-*/
+Search "up" the org_unit tree until we find the first occurrence of an
+org_unit_setting with the given name.
$$;
-- Intended to be used in a unique index on authority.record_entry like so:
@@ -410,10 +408,8 @@
$func$ LANGUAGE 'plperlu' IMMUTABLE;
COMMENT ON FUNCTION authority.normalize_heading( TEXT ) IS $$
-/**
-* Extract the authority heading, thesaurus, and NACO-normalized values
-* from an authority record. The primary purpose is to build a unique
-* index to defend against duplicated authority records from the same
-* thesaurus.
-*/
+Extract the authority heading, thesaurus, and NACO-normalized values
+from an authority record. The primary purpose is to build a unique
+index to defend against duplicated authority records from the same
+thesaurus.
$$;
Modified: branches/rel_2_1/Open-ILS/src/sql/Pg/090.schema.action.sql
===================================================================
--- branches/rel_2_1/Open-ILS/src/sql/Pg/090.schema.action.sql 2011-04-18 15:43:34 UTC (rev 20163)
+++ branches/rel_2_1/Open-ILS/src/sql/Pg/090.schema.action.sql 2011-04-18 15:43:36 UTC (rev 20164)
@@ -915,13 +915,11 @@
$$ LANGUAGE plpgsql;
COMMENT ON FUNCTION action.apply_fieldset( INT, TEXT, TEXT, TEXT ) IS $$
-/**
- * Applies a specified fieldset, using a supplied table name and primary
- * key name. The query parameter should be non-null only for
- * query-based fieldsets.
- *
- * Returns NULL if successful, or an error message if not.
- */
+Applies a specified fieldset, using a supplied table name and primary
+key name. The query parameter should be non-null only for
+query-based fieldsets.
+
+Returns NULL if successful, or an error message if not.
$$;
Modified: branches/rel_2_1/Open-ILS/src/sql/Pg/200.schema.acq.sql
===================================================================
--- branches/rel_2_1/Open-ILS/src/sql/Pg/200.schema.acq.sql 2011-04-18 15:43:34 UTC (rev 20163)
+++ branches/rel_2_1/Open-ILS/src/sql/Pg/200.schema.acq.sql 2011-04-18 15:43:36 UTC (rev 20164)
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2009 Georgia Public Library Service
+ * Scott McKellar <scott 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 IF EXISTS acq CASCADE;
BEGIN;
@@ -179,40 +194,23 @@
acq.funding_source_credit;
COMMENT ON VIEW acq.ordered_funding_source_credit IS $$
-/*
- * Copyright (C) 2009 Georgia Public Library Service
- * Scott McKellar <scott at gmail.com>
- *
- * The acq.ordered_funding_source_credit view is a prioritized
- * ordering of funding source credits. When ordered by the first
- * three columns, this view defines the order in which the various
- * credits are to be tapped for spending, subject to the allocations
- * in the acq.fund_allocation table.
- *
- * The first column reflects the principle that we should spend
- * money with deadlines before spending money without deadlines.
- *
- * The second column reflects the principle that we should spend the
- * oldest money first. For money with deadlines, that means that we
- * spend first from the credit with the earliest deadline. For
- * money without deadlines, we spend first from the credit with the
- * earliest effective date.
- *
- * The third column is a tie breaker to ensure a consistent
- * ordering.
- *
- * ****
- *
- * 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.
- */
+The acq.ordered_funding_source_credit view is a prioritized
+ordering of funding source credits. When ordered by the first
+three columns, this view defines the order in which the various
+credits are to be tapped for spending, subject to the allocations
+in the acq.fund_allocation table.
+
+The first column reflects the principle that we should spend
+money with deadlines before spending money without deadlines.
+
+The second column reflects the principle that we should spend the
+oldest money first. For money with deadlines, that means that we
+spend first from the credit with the earliest deadline. For
+money without deadlines, we spend first from the credit with the
+earliest effective date.
+
+The third column is a tie breaker to ensure a consistent
+ordering.
$$;
CREATE TABLE acq.fund (
@@ -687,35 +685,17 @@
ON acq.fund_transfer( transfer_user );
COMMENT ON TABLE acq.fund_transfer IS $$
-/*
- * Copyright (C) 2009 Georgia Public Library Service
- * Scott McKellar <scott at esilibrary.com>
- *
- * Fund Transfer
- *
- * Each row represents the transfer of money from a source fund
- * to a destination fund. There should be corresponding entries
- * in acq.fund_allocation. The purpose of acq.fund_transfer is
- * to record how much money moved from which fund to which other
- * fund.
- *
- * The presence of two amount fields, rather than one, reflects
- * the possibility that the two funds are denominated in different
- * currencies. If they use the same currency type, the two
- * amounts should be the same.
- *
- * ****
- *
- * 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.
- */
+Fund Transfer
+Each row represents the transfer of money from a source fund
+to a destination fund. There should be corresponding entries
+in acq.fund_allocation. The purpose of acq.fund_transfer is
+to record how much money moved from which fund to which other
+fund.
+
+The presence of two amount fields, rather than one, reflects
+the possibility that the two funds are denominated in different
+currencies. If they use the same currency type, the two
+amounts should be the same.
$$;
CREATE TABLE acq.fiscal_calendar (
Modified: branches/rel_2_1/Open-ILS/src/sql/Pg/999.functions.global.sql
===================================================================
--- branches/rel_2_1/Open-ILS/src/sql/Pg/999.functions.global.sql 2011-04-18 15:43:34 UTC (rev 20163)
+++ branches/rel_2_1/Open-ILS/src/sql/Pg/999.functions.global.sql 2011-04-18 15:43:36 UTC (rev 20164)
@@ -37,10 +37,8 @@
$$ LANGUAGE plpgsql;
COMMENT ON FUNCTION actor.usr_merge_rows(TEXT, TEXT, INT, INT) IS $$
-/**
- * Attempts to move each row of the specified table from src_user to dest_user.
- * Where conflicts exist, the conflicting "source" row is deleted.
- */
+Attempts to move each row of the specified table from src_user to dest_user.
+Where conflicts exist, the conflicting "source" row is deleted.
$$;
@@ -360,10 +358,8 @@
$$ LANGUAGE plpgsql;
COMMENT ON FUNCTION actor.usr_merge(INT, INT, BOOLEAN, BOOLEAN, BOOLEAN) IS $$
-/**
- * Merges all user date from src_usr to dest_usr. When collisions occur,
- * keep dest_usr's data and delete src_usr's data.
- */
+Merges all user date from src_usr to dest_usr. When collisions occur,
+keep dest_usr's data and delete src_usr's data.
$$;
@@ -692,10 +688,8 @@
$$ LANGUAGE plpgsql;
COMMENT ON FUNCTION actor.usr_purge_data(INT, INT) IS $$
-/**
- * Finds rows dependent on a given row in actor.usr and either deletes them
- * or reassigns them to a different user.
- */
+Finds rows dependent on a given row in actor.usr and either deletes them
+or reassigns them to a different user.
$$;
@@ -814,10 +808,8 @@
$$ LANGUAGE plpgsql;
COMMENT ON FUNCTION actor.usr_delete(INT, INT) IS $$
-/**
- * Logically deletes a user. Removes personally identifiable information,
- * and purges associated data in other tables.
- */
+Logically deletes a user. Removes personally identifiable information,
+and purges associated data in other tables.
$$;
@@ -840,10 +832,8 @@
$$ LANGUAGE plpgsql;
COMMENT ON FUNCTION actor.approve_pending_address(INT) IS $$
-/**
- * Replaces an address with a pending address. This is done by giving the pending
- * address the ID of the old address. The replaced address is retained with -id.
- */
+Replaces an address with a pending address. This is done by giving the pending
+address the ID of the old address. The replaced address is retained with -id.
$$;
CREATE OR REPLACE FUNCTION container.clear_expired_circ_history_items(
@@ -904,11 +894,9 @@
$$ LANGUAGE plpgsql;
COMMENT ON FUNCTION container.clear_expired_circ_history_items( INTEGER ) IS $$
-/*
- * Delete old circulation bucket items for a specified user.
- * "Old" means older than the interval specified by a
- * user-level setting, if it is so specified.
-*/
+Delete old circulation bucket items for a specified user.
+"Old" means older than the interval specified by a
+user-level setting, if it is so specified.
$$;
CREATE OR REPLACE FUNCTION container.clear_all_expired_circ_history_items( )
@@ -966,10 +954,8 @@
$$ LANGUAGE plpgsql;
COMMENT ON FUNCTION container.clear_all_expired_circ_history_items( ) IS $$
-/*
- * Delete expired circulation bucket items for all users that have
- * a setting for patron.max_reading_list_interval.
-*/
+Delete expired circulation bucket items for all users that have
+a setting for patron.max_reading_list_interval.
$$;
CREATE OR REPLACE FUNCTION asset.merge_record_assets( target_record BIGINT, source_record BIGINT ) RETURNS INT AS $func$
More information about the open-ils-commits
mailing list