Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision |
dev:proposal:patron_statistical_categories [2012/03/18 18:40] – [Objects Affected] sprater | dev:proposal:patron_statistical_categories [2012/03/20 23:32] – [Objects Affected] update table definition sprater |
---|
**NEW Database TABLE ''actor.stat_cat_entry_default''** | **NEW Database TABLE ''actor.stat_cat_entry_default''** |
* Create a new table ''actor.stat_cat_entry_default'' to store default entries for statistical categories. It will have the following structure: | * Create a new table ''actor.stat_cat_entry_default'' to store default entries for statistical categories. It will have the following structure: |
| * |
id SERIAL PRIMARY KEY, | id SERIAL PRIMARY KEY, |
stat_cat_entry INT NOT NULL references actor.stat_cat_entry, | stat_cat_entry INT NOT NULL REFERENCES actor.stat_cat_entry(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, |
stat_cat INT NOT NULL references actor.stat_cat, | stat_cat INT NOT NULL REFERENCES actor.stat_cat(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, |
org_unit INT NOT NULL references actor.org_unit, | owner INT NOT NULL REFERENCES actor.org_unit(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, |
CONSTRAINT sced_once_per_org_unit UNIQUE (stat_cat,org_unit) | CONSTRAINT sced_once_per_owner UNIQUE (stat_cat,owner) |
| |
See [[https://github.com/sprater/Evergreen/blob/patcatstat/Open-ILS/src/sql/Pg/005.schema.actors.sql|005.schema.actors.sql]] and [[https://github.com/sprater/Evergreen/blob/patcatstat/Open-ILS/src/sql/Pg/950.data.seed-values.sql|950.data.seed-values.sql]]. | See [[https://github.com/sprater/Evergreen/blob/patcatstat/Open-ILS/src/sql/Pg/005.schema.actors.sql|005.schema.actors.sql]] and [[https://github.com/sprater/Evergreen/blob/patcatstat/Open-ILS/src/sql/Pg/950.data.seed-values.sql|950.data.seed-values.sql]]. |