From c49d5eeac9c3446fa1d49decc0ba5fdf12e87727 Mon Sep 17 00:00:00 2001 From: Nicole C. Engard Date: Wed, 18 Jul 2012 21:34:44 -0400 Subject: [PATCH] Bug 6716: Document saved_sql table --- installer/data/mysql/kohastructure.sql | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3b9827a..545564a 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -899,10 +899,10 @@ CREATE TABLE `import_records` ( -- Table structure for `import_record_matches` -- DROP TABLE IF EXISTS `import_record_matches`; -CREATE TABLE `import_record_matches` ( - `import_record_id` int(11) NOT NULL, - `candidate_match_id` int(11) NOT NULL, - `score` int(11) NOT NULL default 0, +CREATE TABLE `import_record_matches` ( -- matches found when importing a batch of records + `import_record_id` int(11) NOT NULL, -- the id given to the imported bib record (import_records.import_record_id) + `candidate_match_id` int(11) NOT NULL, -- the biblio the imported record matches (biblio.biblionumber) + `score` int(11) NOT NULL default 0, -- the match score CONSTRAINT `import_record_matches_ibfk_1` FOREIGN KEY (`import_record_id`) REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE, KEY `record_score` (`import_record_id`, `score`) @@ -1710,16 +1710,16 @@ CREATE TABLE `roadtype` ( -- road types defined in administration and used in pa -- DROP TABLE IF EXISTS `saved_sql`; -CREATE TABLE saved_sql ( - `id` int(11) NOT NULL auto_increment, - `borrowernumber` int(11) default NULL, - `date_created` datetime default NULL, - `last_modified` datetime default NULL, - `savedsql` text, +CREATE TABLE saved_sql ( -- saved reports + `id` int(11) NOT NULL auto_increment, -- unique id and primary key assigned by Koha + `borrowernumber` int(11) default NULL, -- the staff member who created this report (borrowers.borrowernumber) + `date_created` datetime default NULL, -- the date this report was created + `last_modified` datetime default NULL, -- the date this report was last edited + `savedsql` text, -- the SQL for this report `last_run` datetime default NULL, - `report_name` varchar(255) default NULL, - `type` varchar(255) default NULL, - `notes` text, + `report_name` varchar(255) default NULL, -- the name of this report + `type` varchar(255) default NULL, -- always 1 for tabular + `notes` text, -- the notes or description given to this report `cache_expiry` int NOT NULL default 300, `public` boolean NOT NULL default FALSE, PRIMARY KEY (`id`), -- 1.7.2.3