[Koha-bugs] [Bug 13624] Remove columns branchcode, categorytype from table overduerules_transport_types
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jun 4 14:31:42 CEST 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13624
--- Comment #18 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Comment on attachment 38290
--> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38290
Bug 13624 - Remove columns branchcode, categorytype from table
overduerules_transport_types
Review of attachment 38290:
--> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=13624&attachment=38290)
-----------------------------------------------------------------
Could you please tidy the atomicupdate file a bit? (trailing space, uppercase
the mysql kw, etc.)
:::
installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl
@@ +10,5 @@
> +#if ( CheckVersion($DBversion) ) {
> + $dbh->do("SET FOREIGN_KEY_CHECKS=0");
> + $dbh->do("ALTER TABLE overduerules RENAME old_overduerules");
> + $dbh->do("CREATE TABLE overduerules (
> + `overduerules_id` mediumint NOT NULL AUTO_INCREMENT,
Why mediumint?
@@ +25,5 @@
> + `debarred3` int(1) DEFAULT '0',
> + PRIMARY KEY (`overduerules_id`)
> + ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
> + $dbh->do("INSERT INTO overduerules(branchcode, categorycode, delay1, letter1, debarred1, delay2, debarred2, letter2, delay3, letter3, debarred3) SELECT * FROM old_overduerules");
> + $dbh->do("DROP TABLE old_overduerules");
Is not possible to just add the primary key to the existing table?
::: installer/data/mysql/kohastructure.sql
@@ -1713,4 @@
> `delay3` int(4) default NULL, -- number of days after the item is overdue that the third notice is sent
> `letter3` varchar(20) default NULL, -- foreign key from the letter table to define which notice should be sent as the third notice
> `debarred3` int(1) default 0, -- is the patron restricted when the third notice is sent (1 for yes, 0 for no)
> - PRIMARY KEY (`branchcode`,`categorycode`)
I think we should keep this constraint too.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list