http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3624
Katrin Fischer <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #23 from Katrin Fischer <[email protected]> 2011-10-28 16:30:30 UTC --- Ok, I have looked into this: NEW INSTALLATIONS kohastructure.sql seems correct now. I also checked a new database, all fields are there. DROP TABLE IF EXISTS `aqbasketgroups`; CREATE TABLE `aqbasketgroups` ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) default NULL, `closed` tinyint(1) default NULL, `booksellerid` int(11) NOT NULL, `deliveryplace` varchar(10) default NULL, `freedeliveryplace` text default NULL, `deliverycomment` varchar(255) default NULL, `billingplace` varchar(10) default NULL, PRIMARY KEY (`id`), KEY `booksellerid` (`booksellerid`), CONSTRAINT `aqbasketgroups_ibfk_1` FOREIGN KEY (`booksellerid`) REFERENCES `aqbooksellers` (`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; UPDATED INSTALLATIONS Installations updating from a version number below 3.01.00.94 should be ok. I checked the sql statements are correct. First update in updatedatabase.pl: $DBversion = "3.01.00.094"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do(qq{ALTER TABLE aqbasketgroups ADD deliveryplace VARCHAR(10) default NULL, ADD deliverycomment VARCHAR(255) default NULL;}); $DBversion = "3.01.00.097"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do(qq{ALTER TABLE aqbasketgroups ADD billingplace VARCHAR(10) NOT NULL AFTER deliverycomment;}); NEW INSTALLATIONS CREATED WHILE FIELDS WHERE MISSING I have removed the 3 columns from my database and added the code below as 3.06.00.001 to my updatedatabase. The updatedatabase reported no errors, but the columns were NOT added to my databse. $DBversion = '3.03.00.023'; I created a branch for an old version of Koha (3.02.04.000) and recreated my database from scratch. The 3 columns are missing from aqbasketgroups. I checked out back to master and ran the web installer. Got some complaints about privacy and: Upgrade to 3.03.00.023 done (Reconcile aqbasketgroups) Confirmed that columns were correctly added to the datebase. if (C4::Context->preference("Version") < TransformToNum($DBversion) && $original_version < TransformToNum("3.02.05.002")) { my $sth = $dbh->prepare("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'aqbasketgroups' AND COLUMN_NAME = 'billingplace'"); $sth->execute; $dbh->do("ALTER TABLE aqbasketgroups ADD billingplace VARCHAR(10)") if ! $sth->fetchrow_hashref; $sth = $dbh->prepare("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'aqbasketgroups' AND COLUMN_NAME = 'deliveryplace'"); $sth->execute; $dbh->do("ALTER TABLE aqbasketgroups ADD deliveryplace VARCHAR(10)") if ! $sth->fetchrow_hashref; $sth = $dbh->prepare("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'aqbasketgroups' AND COLUMN_NAME = 'deliverycomment'"); $sth->execute; $dbh->do("ALTER TABLE aqbasketgroups ADD deliverycomment VARCHAR(255)") if ! $sth->fetchrow_hashref; print "Upgrade to $DBversion done (Reconcile aqbasketgroups)\n"; SetVersion ($DBversion); } XHTML VALIDITY Checked on current master. Ok. I am marking this closed, please reopen if I missed something. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
