Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types
Summary: Remove columns branchcode, categorytype from table overduerules_transport_types
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Target Milestone: ---
Assignee: Charles Farmer
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 12771 12772 15478 15601 16007
  Show dependency treegraph
 
Reported: 2015-01-26 17:10 UTC by Charles Farmer
Modified: 2017-09-07 15:45 UTC (History)
13 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Remove columns branchcode, categorytype from table overduerules_transport_types (6.19 KB, patch)
2015-01-27 17:07 UTC, Charles Farmer
Details | Diff | Splinter Review
[PATCH] Bug #13624: Remove columns branchcode, categorytype from table overduerules_transport_types (10.32 KB, patch)
2015-01-28 17:13 UTC, Charles Farmer
Details | Diff | Splinter Review
[PATCH] Bug #13624: Remove columns branchcode, categorytype from table overduerules_transport_types (10.21 KB, patch)
2015-02-23 14:48 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug #13624: Remove columns branchcode, categorytype from table overduerules_transport_types (10.20 KB, patch)
2015-03-04 14:09 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug #13624: Remove columns branchcode, categorytype from table overduerules_transport_types (10.25 KB, patch)
2015-03-04 14:25 UTC, Jesse Maseto
Details | Diff | Splinter Review
Bugs 13624 - Test plan and fixes db scripts for overduerules migrations (4.80 KB, patch)
2015-03-20 19:47 UTC, Blou
Details | Diff | Splinter Review
Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types (11.10 KB, patch)
2015-04-21 17:56 UTC, Blou
Details | Diff | Splinter Review
Bug 13624 - Correcting the atomicupdate/ file. Dev-only patch (1.13 KB, patch)
2015-04-21 18:00 UTC, Blou
Details | Diff | Splinter Review
Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types (11.17 KB, patch)
2015-04-21 18:10 UTC, Jesse Maseto
Details | Diff | Splinter Review
Bug 13624 - Tidying the atomicupdate file and kohastructure.sql (5.92 KB, patch)
2015-06-05 19:07 UTC, Blou
Details | Diff | Splinter Review
Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types (11.16 KB, patch)
2015-06-18 18:06 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 13624 - Tidying the atomicupdate file and kohastructure.sql (5.92 KB, patch)
2015-06-18 18:06 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types (11.21 KB, patch)
2015-08-19 19:24 UTC, Martin Persson
Details | Diff | Splinter Review
Bug 13624 - Tidying the atomicupdate file and kohastructure.sql (5.97 KB, patch)
2015-08-19 19:25 UTC, Martin Persson
Details | Diff | Splinter Review
Bug 13624 - renaming atomicupdate from .pl to .perl (890 bytes, patch)
2015-10-16 15:00 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 13624 - renaming atomicupdate from .pl to .perl (1.18 KB, patch)
2015-10-18 13:03 UTC, Eivin Giske Skaaren
Details | Diff | Splinter Review
Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types (11.28 KB, patch)
2015-10-19 09:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13624 - Tidying the atomicupdate file and kohastructure.sql (6.04 KB, patch)
2015-10-19 09:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13624 - renaming atomicupdate from .pl to .perl (1.25 KB, patch)
2015-10-19 09:19 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Farmer 2015-01-26 17:10:48 UTC
Sponsored by Halland County Library

This patch is a requirement to Bug #12771.

Instead of keeping 'branchcode' and 'categorytype' in the table overduerules_transport_types, a foreign key named 'overduerules_fk' now references the appropriate entry in the table overduerules.

This will be necessary once we start managing more than 3 levels of overdue notice.
Comment 1 Charles Farmer 2015-01-27 17:07:15 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2015-01-28 09:07:24 UTC
Quick note:
1/ You should add the DB changes to the kohastructure.sql file
2/ This patch should not be pushed as it, it will break tools/overduerules.pl
If I am not wrong, could you confirm that and explain how you would like to see the patches integrated into master?
You have just said "this patch is a requirement to bug 12771".
Comment 3 Charles Farmer 2015-01-28 17:13:08 UTC Comment hidden (obsolete)
Comment 4 Charles Farmer 2015-01-28 17:22:59 UTC
(In reply to Jonathan Druart from comment #2)
> Quick note:
> 1/ You should add the DB changes to the kohastructure.sql file
> 2/ This patch should not be pushed as it, it will break tools/overduerules.pl
> If I am not wrong, could you confirm that and explain how you would like to
> see the patches integrated into master?
> You have just said "this patch is a requirement to bug 12771".

1) The changes to kohastructure.sql were added in the newest patch
2) Indeed, tools/overduerules.pl had to be slightly changed in order to make things work. The new patch should fix any issues with that file.

I'm submitting #13624 separate from #12771 in order to make 12771's patch a little lighter. The patch I just submitted can be applied as is. Does it answer your question?
Comment 5 Jonathan Druart 2015-01-29 10:19:24 UTC
(In reply to Charles Farmer from comment #4)
> (In reply to Jonathan Druart from comment #2)
> > Quick note:
> > 1/ You should add the DB changes to the kohastructure.sql file
> > 2/ This patch should not be pushed as it, it will break tools/overduerules.pl
> > If I am not wrong, could you confirm that and explain how you would like to
> > see the patches integrated into master?
> > You have just said "this patch is a requirement to bug 12771".
> 
> 1) The changes to kohastructure.sql were added in the newest patch
> 2) Indeed, tools/overduerules.pl had to be slightly changed in order to make
> things work. The new patch should fix any issues with that file.
> 
> I'm submitting #13624 separate from #12771 in order to make 12771's patch a
> little lighter. The patch I just submitted can be applied as is. Does it
> answer your question?

Perfect, thanks!
Comment 6 Jonathan Druart 2015-02-20 11:53:49 UTC
$ mysql
MariaDB [koha]> drop database koha;
MariaDB [koha]> create database koha CHARACTER SET utf8 COLLATE utf8_unicode_ci;

$ git checkout master
$ mysql < installer/data/mysql/kohastructure.sql
$ git bz apply 13624
$ perl installer/data/mysql/atomicupdate/bug_13624_overduerules_transport_types.pl 

DBD::mysql::db do failed: Duplicate foreign key constraint name 'koha/overduerules_fk' at installer/data/mysql/atomicupdate/bug_13624_overduerules_transport_types.pl line 33.
Comment 7 Charles Farmer 2015-02-23 14:46:33 UTC
(In reply to Jonathan Druart from comment #6)

> DBD::mysql::db do failed: Duplicate foreign key constraint name
> 'koha/overduerules_fk' at
> installer/data/mysql/atomicupdate/bug_13624_overduerules_transport_types.pl
> line 33.

I changed the foreign key name and placed the changes in updatedatabase.pl instead of a stand alone file. I hope this solves the problem.
Comment 8 Charles Farmer 2015-02-23 14:48:15 UTC Comment hidden (obsolete)
Comment 9 Jesse Maseto 2015-03-04 13:32:05 UTC
I received a CONFLICT while trying to apply this patch.

-Jesse


CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Failed to merge in the changes.
Patch failed at 0001 Bug #13624: Remove columns branchcode, categorytype from table overduerules_transport_types
Comment 10 Charles Farmer 2015-03-04 14:09:04 UTC Comment hidden (obsolete)
Comment 11 Jesse Maseto 2015-03-04 14:25:26 UTC Comment hidden (obsolete)
Comment 12 Jonathan Druart 2015-03-17 12:15:34 UTC
1/ On updating the overdue rules (overduerules.pl), I got:

overduerules.pl: DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at /home/koha/src/tools/overduerules.pl line 188.

2/ Provide a complete test plan

3/ The new DB column has to be inserted at the same place as in the kohastructure.sql file.

Marked as Failed QA.
Comment 13 Blou 2015-03-20 19:47:17 UTC Comment hidden (obsolete)
Comment 14 Blou 2015-04-21 17:56:38 UTC Comment hidden (obsolete)
Comment 15 Blou 2015-04-21 18:00:03 UTC Comment hidden (obsolete)
Comment 16 Blou 2015-04-21 18:01:40 UTC
There was merging issues with updatedatabase.pl.  Now replaced by new method using atomicupdate/ directory.  I hope it all works well.
Comment 17 Jesse Maseto 2015-04-21 18:10:51 UTC Comment hidden (obsolete)
Comment 18 Jonathan Druart 2015-06-04 12:31:42 UTC
Comment on attachment 38290 [details] [review]
Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types

Review of attachment 38290 [details] [review]:
-----------------------------------------------------------------

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.
Comment 19 Jonathan Druart 2015-06-04 13:16:53 UTC
(In reply to Jonathan Druart from comment #18)
> ::: 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.

This is not clear. I meant we should keep branchcode and categorycode as a unique key.
Comment 20 Blou 2015-06-05 18:28:35 UTC
Hi Jonathan,
I'll try to reply to these to the best of my knowledge

1) tidying : I'm on it, but I couldn't find much beside 3-4 keywords.  No extra space, as this code had been through qa-test before.

2) mediumint : no valid reason whatsoever, reasoning prb lost in time, along with the initial coder.  I'll change to int(11)

3) simple ALTER ADD : Well, I remembered trying, so I tried again and could not.  The existing constraints, the relation to OTT, the auto_increment... Whatever I tried failed.  I won't say it's "simpler this way", but I just couldn't make it work otherwise.

4) Took me a while to remember WHY we want it out.  I guess it's premature, but this is the first step to allow for unlimited "steps", and as such that combo cannot be unique.  BUT this being the first step, I cannot justify removing it yet, only that it will be more complicated to remove later.
I WILL LEAVE IT IN, you being QA and all ;)

Mini Patch coming...
Comment 21 Blou 2015-06-05 19:07:07 UTC Comment hidden (obsolete)
Comment 22 Jonathan Druart 2015-06-16 10:43:05 UTC
Applying: Bug 13624 - Tidying the atomicupdate file and kohastructure.sql
fatal: sha1 information is lacking or useless (installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl).

Please rebase.
Comment 23 M. Tompsett 2015-06-17 11:53:29 UTC
This applies just fine for me off of master.
Comment 24 Jonathan Druart 2015-06-18 11:23:12 UTC
Sorry but:

% git fetch origin
% git checkout -b bug_13624 origin/master
% git clean -f -d
% git bz apply 13624
Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types

38290 - Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types
39920 - Bug 13624 - Tidying the atomicupdate file and kohastructure.sql

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types
Applying: Bug 13624 - Tidying the atomicupdate file and kohastructure.sql
fatal: sha1 information is lacking or useless (installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.


Please reupload the patches if they apply for you.
Comment 25 M. Tompsett 2015-06-18 18:06:23 UTC Comment hidden (obsolete)
Comment 26 M. Tompsett 2015-06-18 18:06:30 UTC Comment hidden (obsolete)
Comment 27 M. Tompsett 2015-06-18 18:11:47 UTC
Except for Jonathan's comments, I've uploaded my patches, and they are identical. I don't see any differences. Not sure what status it should be, but I'll throw it to needs sign off instead of "Patch doesn't apply".
Comment 28 Martin Persson 2015-08-19 19:24:31 UTC Comment hidden (obsolete)
Comment 29 Martin Persson 2015-08-19 19:25:12 UTC Comment hidden (obsolete)
Comment 30 Martin Persson 2015-08-19 19:43:17 UTC
Tested these patches against origin/master commit 75d123d760d86f0e0d9f58d65874b40f6816008d. Both patches merged perfectly and both manual and automated tests passed. Tested with 3 categories and all tabs filled with complex, unique combinations of rules. Verified by screenshot before and after. Code looks good to me but I am unfamiliar with some SQL details.
Comment 31 Jonathan Druart 2015-08-20 09:47:49 UTC
(In reply to Blou from comment #20)
> 4) Took me a while to remember WHY we want it out.  I guess it's premature,
> but this is the first step to allow for unlimited "steps", and as such that
> combo cannot be unique.  BUT this being the first step, I cannot justify
> removing it yet, only that it will be more complicated to remove later.
> I WILL LEAVE IT IN, you being QA and all ;)

Sorry, but I think that the constraint should not be removed in this patchset.
Comment 32 Charles Farmer 2015-10-15 17:27:28 UTC
From what I see, the last patch *did* keep branchode and category code as a unique key for table overduerules. Unless there are more things to change, this does not warrant any more discussion.

Since both available patches have been signed off by Marting Persson, I'm putting this to "Signed off".
Comment 33 Jonathan Druart 2015-10-16 10:25:20 UTC
(In reply to Charles Farmer from comment #32)
> From what I see, the last patch *did* keep branchode and category code as a
> unique key for table overduerules. Unless there are more things to change,
> this does not warrant any more discussion.
> 
> Since both available patches have been signed off by Marting Persson, I'm
> putting this to "Signed off".

Do you confirm that the QA concerns have been taken into account, the patches work as advertised and you have tested them?
Comment 34 Charles Farmer 2015-10-16 14:57:37 UTC
(In reply to Jonathan Druart from comment #33)

To better make progress, I would need to know precisely what you mean by "QA concerns". After reading this thread through and through and opening the most recent patches, I think the only concern that wasn't explicitly addressed, about the UNIQUE key, was covered by the patch.

Also, prove was run against t/db_dependant/Overdues.t without errors.

There is, however, one odd thing: atomicupdates are only considered by updatedatabase.pl if the file extension is .perl or .sql, not .pl. I'll follow up this post with a new patch that fixes this problem.
Comment 35 Charles Farmer 2015-10-16 15:00:54 UTC Comment hidden (obsolete)
Comment 36 Eivin Giske Skaaren 2015-10-18 13:03:18 UTC Comment hidden (obsolete)
Comment 37 Jonathan Druart 2015-10-19 09:19:48 UTC
Created attachment 43583 [details] [review]
Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types

This patch is a _requirement_ to Bug #12771, and will be necessary once we start managing more than 3 levels of overdue notice

TEST PLAN
1) Create or improve on overduerules data
  .1) Intranet -> tools -> overdue notices
  .2) Make sure to have data in first, second and third tabs
  .3) Make sure to have checked mixes of Email/Phone/Print/SMS (depending on availability)
  .4) Make sure to have different letters and delay on first/second/third tab for at least one category
  .5) Remember it all.
2) Apply patch
3) run installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl
4) run t/db_dependant/Overdues.t
5) Validate Overdue Notice page
  .1) validate data entered previously is still there
  .2) Add some more, save changes, validate

In installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl
    - A new column and primary key, 'overduerules_id', is added to the table 'overduerules'
    - A new column referencing a foreign key, 'overduerules_id', is added to the table 'overduerules_transport_types'
    - The columns 'branchcode' and 'categorytype' are removed from the table 'overduerules_transport_types'
    - Data is migrated from the old tables to the new ones

In installer/data/mysql/kohastructure.sql :
    - Table 'overduerules'
    - Added a primary key named 'overduerules_id'
    - Table 'overduerules_transport_types'
    - Added a foreign key named 'overduerules_id'
    - Dropped columns 'branchcode', 'categorycode' since we now have them referenced through 'overduerules_id'

In tools/overduerules.pl
    - INSERT and DELETE queries on 'overduerules_transport_types' were changed to reflect the new schema

In C4/Overdues.pm :
    - The SQL query of the function 'GetOverdueMessageTransportTypes' is changed to take into account the new design of 'overduerules_transport

In t/db_dependent/Overdues.t :
    - The INSERT calls before the tests were changed to take into account the new design of 'overduerules' and 'overduerules_transport_types'

Sponsored by : Halland County Library

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

Signed-off-by: Martin Persson <xarragon@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 38 Jonathan Druart 2015-10-19 09:19:52 UTC
Created attachment 43584 [details] [review]
Bug 13624 - Tidying the atomicupdate file and kohastructure.sql

Signed-off-by: Martin Persson <xarragon@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 39 Jonathan Druart 2015-10-19 09:19:59 UTC
Created attachment 43585 [details] [review]
Bug 13624 - renaming atomicupdate from .pl to .perl

I have not tested this very thoroughly e.g. understood the SQL changes etc. since
the patch has been signed off twice before.

But it seems to me like this patch is OK.
Applied, ran automatic tests and saved some values in the overduerules matrix/tabs OK.

Signed-off-by: Eivin Giske Skaaren <eivin@sysmystic.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 40 Kyle M Hall 2015-12-31 12:56:44 UTC
Pushed to master, thanks Philippe!
Comment 41 Jonathan Druart 2016-01-05 09:32:03 UTC
(In reply to Kyle M Hall from comment #40)
> Pushed to master, thanks Philippe!

Please regenerate the Schema files, some tests are failing.
Comment 42 Charles Farmer 2016-01-25 20:25:07 UTC
(In reply to Jonathan Druart from comment #41)
> (In reply to Kyle M Hall from comment #40)
> > Pushed to master, thanks Philippe!
> 
> Please regenerate the Schema files, some tests are failing.

Which tests? I ran update_dbix_class_files.pl and nothing changed in my index...
Comment 43 Jonathan Druart 2016-01-27 10:27:07 UTC
(In reply to Charles Farmer from comment #42)
> (In reply to Jonathan Druart from comment #41)
> > (In reply to Kyle M Hall from comment #40)
> > > Pushed to master, thanks Philippe!
> > 
> > Please regenerate the Schema files, some tests are failing.
> 
> Which tests? I ran update_dbix_class_files.pl and nothing changed in my
> index...

It was a RM note, it has been fixed by bug 15478.
Comment 44 Nick Clemens 2016-03-04 01:45:30 UTC
On a fresh DB I am having issues with the loss of the 'letternumber' column 

overdue_notices.pl throws errors for unknown column, I can't save triggers 

I think the last line below was an accidental deletion?

diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql
...
@@ -2568,12 +2569,10 @@ CREATE TABLE `message_transport_types` (
 DROP TABLE IF EXISTS `overduerules_transport_types`;
 CREATE TABLE overduerules_transport_types(
     `id` INT(11) NOT NULL AUTO_INCREMENT,
-    `branchcode` varchar(10) NOT NULL DEFAULT '',
-    `categorycode` VARCHAR(10) NOT NULL DEFAULT '',
-    `letternumber` INT(1) NOT NULL DEFAULT 1,
Comment 45 M. Tompsett 2016-03-04 02:02:05 UTC
Comment on attachment 38288 [details] [review]
Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types

This is the obsoleted patch where it accidentally disappeared.
Comment 46 M. Tompsett 2016-03-04 02:03:02 UTC
(In reply to Nick Clemens from comment #44)
> On a fresh DB I am having issues with the loss of the 'letternumber' column 
> overdue_notices.pl throws errors for unknown column, I can't save triggers 
> I think the last line below was an accidental deletion?

Yes. I agree with that assessment.
Comment 47 Jonathan Druart 2016-03-04 08:34:09 UTC
(In reply to Nick Clemens from comment #44)
> On a fresh DB I am having issues with the loss of the 'letternumber' column 
> 
> overdue_notices.pl throws errors for unknown column, I can't save triggers 
> 
> I think the last line below was an accidental deletion?
> 
> diff --git a/installer/data/mysql/kohastructure.sql
> b/installer/data/mysql/kohastructure.sql
> ...
> @@ -2568,12 +2569,10 @@ CREATE TABLE `message_transport_types` (
>  DROP TABLE IF EXISTS `overduerules_transport_types`;
>  CREATE TABLE overduerules_transport_types(
>      `id` INT(11) NOT NULL AUTO_INCREMENT,
> -    `branchcode` varchar(10) NOT NULL DEFAULT '',
> -    `categorycode` VARCHAR(10) NOT NULL DEFAULT '',
> -    `letternumber` INT(1) NOT NULL DEFAULT 1,

Oops, indeed!
@inLibro, please provide a follow-up asap
Comment 48 Katrin Fischer 2016-03-07 22:32:01 UTC
Hm, looking at the bug - I think we need to fix kohastructure and provide a database update for installations that are missing the column?
Comment 49 Blou 2016-03-08 15:37:03 UTC
So, we need a patch that corrects the pushed-to-master patch, for future installations.  AND that patch must also provide a fix to those who already installed?
Comment 50 Jonathan Druart 2016-03-09 08:26:33 UTC
(In reply to Blou from comment #49)
> So, we need a patch that corrects the pushed-to-master patch, for future
> installations.  AND that patch must also provide a fix to those who already
> installed?

Yes.
Comment 51 Katrin Fischer 2016-03-09 08:35:44 UTC
I think there should be existing examples for fixes like this - a change to the kohastructure accompanied by a database update. It should ideally check if the column is there already, so people don't get an error on updating in this case.
Comment 52 Charles Farmer 2016-03-09 15:35:16 UTC
Opened bug 16007 for the purpose of correcting the new bug we introduced with this patch.