[Koha-bugs] [Bug 7065] reserves table needs a primary key

2019-12-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Katrin Fischer  changed:

   What|Removed |Added

 Depends on|7711|


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7711
[Bug 7711] clear holds statuses and workflow
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2016-01-12 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065
Bug 7065 depends on bug 7710, which changed state.

Bug 7710 Summary: multiple holds per title
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7710

   What|Removed |Added

 Status|In Discussion   |RESOLVED
 Resolution|--- |DUPLICATE

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2013-05-23 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Julian Maurice  changed:

   What|Removed |Added

   See Also||http://bugs.koha-community.
   ||org/bugzilla3/show_bug.cgi?
   ||id=10185

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2013-04-13 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Katrin Fischer  changed:

   What|Removed |Added

 Blocks||5696

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-07-10 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Paul Poulain  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master
Version|master  |rel_3_10

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-07-05 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

M. de Rooy  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

--- Comment #26 from M. de Rooy  ---
Looks good to me. Last QA comment has been incorporated.
Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-07-05 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

M. de Rooy  changed:

   What|Removed |Added

 CC||m.de.r...@rijksmuseum.nl
 QA Contact|koha-b...@lists.koha-commun |m.de.r...@rijksmuseum.nl
   |ity.org |

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-06-12 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Julian Maurice  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off
 CC||julian.maur...@biblibre.com

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-06-12 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Julian Maurice  changed:

   What|Removed |Added

  Attachment #10140|0   |1
is obsolete||

--- Comment #25 from Julian Maurice  ---
Created attachment 10250
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10250&action=edit
[SIGNED-OFF] Bug 7065 - reserves table needs a primary key

Ok, tmp_reserve is created from old_reserve like said in Paul's comment.
Still works as expected, signed off.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-06-10 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-06-10 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

   Attachment #9740|0   |1
is obsolete||

--- Comment #24 from Kyle M Hall  ---
Created attachment 10140
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10140&action=edit
Bug 7065 - reserves table needs a primary key

Adds the primary key reserve_id to reserves and old_reserves.

Thanks to gmcharlt and jcamins for contributions.

Signed-off-by: MJ Ray 
Signed-off-by: Ian Walls 

Updated DBrev to start with 3.09... instead of 3.08...

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-06-10 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Paul Poulain  changed:

   What|Removed |Added

 Status|Passed QA   |Failed QA

--- Comment #23 from Paul Poulain  ---
Failed QA, and a tricky one !!!

When tmp_reserve is created, it is from reserves, so with 
borrowernumber being NOT NULL default 0

When old_reserves is copied to tmp_reserves ... all NULL borrowernumbers are
transformed to 0 ... and when it's copied back to old_reserves ... booom,
contraint failed:

[Sun Jun 10 18:28:14 2012] updatedatabase.pl: DBD::mysql::db do failed: Cannot
add or update a child row: a foreign key constraint fails
(`lecannetdesmaures`.`old_reserves`, CONSTRAINT `old_reserves_ibfk_1` FOREIGN
KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET
NULL ON UPDATE SET NULL) at
/home/paul/koha.dev/koha-community/installer/data/mysql/updatedatabase.pl line
5395.


That's a common situation to have NULL in old_reserves, when a borrower is
removed from the database but we want to keep the history of the hold "someone
placed a hold on -mm-dd"

I think the solution would be to have tmp_reserve be created from old_reserve,
to enable the NULL field !

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-06-10 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

--- Comment #22 from Paul Poulain  ---
As the _id proposal seems to make most ppl happy, I'll push the patch

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-06-10 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

 Blocks|7710|
 Depends on||7710

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-06-10 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

 Blocks||7710

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-06-10 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

 Depends on|7710|

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-25 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

--- Comment #21 from Paul Poulain  ---
I've started a discussion on koha-devel about naming of primary keys. You're
welcomed to join the discussion !

(I keep passed QA until we've found

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-23 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Ian Walls  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-23 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Ian Walls  changed:

   What|Removed |Added

   Attachment #9413|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-23 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

--- Comment #20 from Ian Walls  ---
Created attachment 9740
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9740&action=edit
[PASSED QA] Bug 7065 - reserves table needs a primary key

Adds the primary key reserve_id to reserves and old_reserves.

Thanks to gmcharlt and jcamins for contributions.

Signed-off-by: MJ Ray 
Signed-off-by: Ian Walls 

Updated DBrev to start with 3.09... instead of 3.08...

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-17 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

--- Comment #19 from Kyle M Hall  ---
Yes. This bug is a blocker for many hold related bugs, some of which I will be
working on.

(In reply to comment #18)
> QA comment: DB change change only.
> However, follow-up(s) will be needed to continue the work, because this
> patch only does not change anything. Kyle, do you plan to work on those
> follow-ups ?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-15 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Paul Poulain  changed:

   What|Removed |Added

 CC||paul.poul...@biblibre.com

--- Comment #18 from Paul Poulain  ---
QA comment: DB change change only.
However, follow-up(s) will be needed to continue the work, because this patch
only does not change anything. Kyle, do you plan to work on those follow-ups ?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-04 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

MJ Ray (software.coop)  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-04 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

MJ Ray (software.coop)  changed:

   What|Removed |Added

   Attachment #9389|0   |1
is obsolete||
   Attachment #9404|0   |1
is obsolete||

--- Comment #17 from MJ Ray (software.coop)  ---
Created attachment 9413
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9413&action=edit
Bug 7065 - reserves table needs a primary key

Adds the primary key reserve_id to reserves and old_reserves.

Thanks to gmcharlt and jcamins for contributions.

Signed-off-by: MJ Ray 

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-03 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

   Attachment #9403|0   |1
is obsolete||

--- Comment #16 from Kyle M Hall  ---
Created attachment 9404
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9404&action=edit
Bug 7065 - reserves table needs a primary key

Adds the primary key reserve_id to reserves and old_reserves.

Thanks to gmcharlt and jcamins for contributions.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-03 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

--- Comment #15 from Kyle M Hall  ---
Created attachment 9403
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9403&action=edit
Bug 7065 - reserves table needs a primary key

Adds the primary key reserve_id to reserves and old_reserves.

Thanks to gmcharlt and jcamins for contributions.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-03 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

--- Comment #14 from Galen Charlton  ---
And a more tested version:

create table tmp_reserves as select * from reserves limit 0;
alter table tmp_reserves add column reservenumber int(11) not null
auto_increment primary key;
insert into tmp_reserves (borrowernumber, reservedate, biblionumber,
constrainttype, branchcode, notificationdate, reminderdate, cancellationdate,
reservenotes, priority, found, timestamp, itemnumber, waitingdate,
expirationdate, lowestPriority) select borrowernumber, reservedate,
biblionumber, constrainttype, branchcode, notificationdate, reminderdate,
cancellationdate, reservenotes, priority, found, timestamp, itemnumber,
waitingdate, expirationdate, lowestPriority from old_reserves order by
reservedate;

set @ai=(select max(reservenumber) from tmp_reserves);

truncate old_reserves;
alter table old_reserves add reservenumber int(11);
insert into old_reserves select * from tmp_reserves where reservenumber <= @ai;

insert into tmp_reserves (borrowernumber, reservedate, biblionumber,
constrainttype, branchcode, notificationdate, reminderdate, cancellationdate,
reservenotes, priority, found, timestamp, itemnumber, waitingdate,
expirationdate, lowestPriority) select borrowernumber, reservedate,
biblionumber, constrainttype, branchcode, notificationdate, reminderdate,
cancellationdate, reservenotes, priority, found, timestamp, itemnumber,
waitingdate, expirationdate, lowestPriority from reserves order by reservedate;

alter table reserves add reservenumber int(11) not null auto_increment
primary_key;
truncate reserves;
insert into reserves select * from tmp_reserves where reservenumber > @ai;
drop table tmp_reserves;

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-03 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Galen Charlton  changed:

   What|Removed |Added

 CC||gmcha...@gmail.com

--- Comment #13 from Galen Charlton  ---
(In reply to comment #11)
> Would this be safer as an updatedatabase approach:
> 
> alter table reserves add column reservenumber int(11) not null
> auto_increment primary key;
> set @ai=(select max(reservenumber) from reserves);
> alter table old_reserves add reservenumber int(11);
> insert into reserves select * from old_reserves;
> truncate old_reserves;
> insert into old_reserves select * from reserves where reservenumber > @ai;
> delete from reserves where reservenumber > @ai;
> alter table old_reserves add primary key reservenumber;

I suggest a variant of this approach so that old reserves have lower IDs than
current ones.  Note that this is *untested*:

create table tmp_reserves as select * from reserves limit 0;
alter table tmp_reserves add column reservenumber int(11) not null
auto_increment primary key;
insert into tmp_reserves select * from old_reserves order by reservedate;

truncate old_reserves;
alter table old_reserves add reservenumber int(11);
insert into old_reserves select * from tmp_reserves);
truncate tmp_reserves;

insert into tmp_reserves select * from reserves order by reservedate;
alter table reserves add reservenumber int(11) not null auto_increment
primary_key;
truncate reserves;
insert into reserves select * from tmp_reserves);
drop table tmp_reserves;

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-03 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

--- Comment #12 from Kyle M Hall  ---
I like it. Perhaps we can get some input from others. I do prefer reserve_id
over reservenumber though, if only because it has fewer characters and is more
readable imho.

(In reply to comment #11)
> Would this be safer as an updatedatabase approach:
> 
> alter table reserves add column reservenumber int(11) not null
> auto_increment primary key;
> set @ai=(select max(reservenumber) from reserves);
> alter table old_reserves add reservenumber int(11);
> insert into reserves select * from old_reserves;
> truncate old_reserves;
> insert into old_reserves select * from reserves where reservenumber > @ai;
> delete from reserves where reservenumber > @ai;
> alter table old_reserves add primary key reservenumber;

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-03 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

--- Comment #11 from MJ Ray (software.coop)  ---
Would this be safer as an updatedatabase approach:

alter table reserves add column reservenumber int(11) not null auto_increment
primary key;
set @ai=(select max(reservenumber) from reserves);
alter table old_reserves add reservenumber int(11);
insert into reserves select * from old_reserves;
truncate old_reserves;
insert into old_reserves select * from reserves where reservenumber > @ai;
delete from reserves where reservenumber > @ai;
alter table old_reserves add primary key reservenumber;

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-02 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

   Attachment #9388|0   |1
is obsolete||

--- Comment #10 from Kyle M Hall  ---
Created attachment 9389
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9389&action=edit
Bug 7065 - reserves table needs a primary key

Adds the primary key reserve_id to reserves and old_reserves.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-02 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-05-02 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

   Attachment #8305|0   |1
is obsolete||

--- Comment #9 from Kyle M Hall  ---
Created attachment 9388
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9388&action=edit
Bug 7065 - reserves table needs a primary key

Adds the primary key reserve_id to reserves and old_reserves.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-04-30 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

MJ Ray (software.coop)  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply
 CC||m...@software.coop
Version|unspecified |master

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-04-30 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

MJ Ray (software.coop)  changed:

   What|Removed |Added

 Blocks||7717

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-19 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

   Attachment #8304|0   |1
is obsolete||

--- Comment #8 from Kyle M Hall  ---
Created attachment 8305
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8305&action=edit
Bug 7065 - reserves table needs a primary key

Adds the primary key reservenumber to reserves and old_reserves.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-19 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

   Attachment #8300|0   |1
is obsolete||

--- Comment #7 from Kyle M Hall  ---
Created attachment 8304
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8304&action=edit
Bug 7065 - reserves table needs a primary key

Adds the primary key reservenumber to reserves and old_reserves.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-19 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

--- Comment #6 from Kyle M Hall  ---
(In reply to comment #4)

The problem was that the updates weren't using enough columns to ensure each
update worked on a unique row. This new version uses *every* column, so we
shouldn't have that problem now.

I also removed the print lines for each update, they really shouldn't have been
in there in the first place.

> This doesn't quite work for me. First of all, I'm a little dubious about
> listing every single change. Second, the update for old_reserves set the
> reservenumber to 0 for the first 1078 reserves in my database, leaving only
> 8 with valid reservenumbers. This led to the following error:
> DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY' at
> installer/data/mysql/updatedatabase.pl line 4960.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-19 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

   Attachment #8036|0   |1
is obsolete||

--- Comment #5 from Kyle M Hall  ---
Created attachment 8300
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8300&action=edit
Bug 7065 - reserves table needs a primary key

Adds the primary key reservenumber to reserves and old_reserves.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-17 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Jared Camins-Esakov  changed:

   What|Removed |Added

 Status|Needs Signoff   |Failed QA

--- Comment #4 from Jared Camins-Esakov  ---
This doesn't quite work for me. First of all, I'm a little dubious about
listing every single change. Second, the update for old_reserves set the
reservenumber to 0 for the first 1078 reserves in my database, leaving only 8
with valid reservenumbers. This led to the following error:
DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY' at
installer/data/mysql/updatedatabase.pl line 4960.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-13 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Melia Meggs  changed:

   What|Removed |Added

 Depends on||7711

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-13 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Melia Meggs  changed:

   What|Removed |Added

 Depends on|7711|

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-13 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Melia Meggs  changed:

   What|Removed |Added

 Depends on||7711

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-13 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Melia Meggs  changed:

   What|Removed |Added

 Blocks|7710|
 Depends on||7710

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-13 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Melia Meggs  changed:

   What|Removed |Added

 Blocks||7710

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-06 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-06 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

   Attachment #7789|0   |1
is obsolete||

--- Comment #3 from Kyle M Hall  ---
Created attachment 8036
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8036&action=edit
Bug 7065 - reserves table needs a primary key

Adds the primary key reservenumber to reserves and old_reserves.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-03-03 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Jared Camins-Esakov  changed:

   What|Removed |Added

 Status|Needs Signoff   |Failed QA
 CC||jcam...@cpbibliography.com

--- Comment #2 from Jared Camins-Esakov  ---
We've discussed this on IRC, and have a few concerns. From IRC:

<@rangi> well theres one issue
<@rangi> you dont want auto_increment on old_reserves
< jcamins> Yeah, it's removed after the update.
<@rangi> hmmm
<@rangi> yeah i dont like it
< jcamins> I guess the proper way to do it is create a temporary table?
<@rangi> yes
<@rangi> and also, im not seeing where it changes the old_reserves
< jcamins> At the very end.
<@rangi> no
<@rangi> the update_sth
<@rangi> it does the same one twice
<@rangi> the 2 whiles
<@rangi> not changing renumbering old_reserves
<@rangi> or am i missing something
<@rangi> +my $query = "UPDATE reserves SET reservenumber = ? WHERE 
 reservenumber = ?";
<@rangi> +my $update_sth = $dbh->prepare( $query );
< jcamins> Oh, I see.
<@rangi> then it runs that updated_sth twice
<@rangi> so it just renumbers reserves twice
< jcamins> I think you are correct.
<@rangi> doesnt renumber old_reserves at all
...
< cait> so renumber them manually, first oldreserves then reserves?
<@rangi> that would work
< jcamins> It renumbers old_reserves at the beginning.
< jcamins> Using the ALTER TABLE.
<@rangi> hmm, that should definitely not do that
<@rangi> thats def a mysqlism
< jcamins> It also doesn't work properly.
<@rangi> yeah
< jcamins> It breaks the index.
<@rangi> yup
< jcamins> Somehow.
< jcamins> It's weird.
<@rangi> personally id renumber them with with a loop
<@rangi> old_reserves first, then reserves
< cait> makes sense
<@rangi> and id also make the column unique
< jcamins> That won't work either.
<@rangi> why not?
< cait> jcamins: why not?
< cait> lol
< jcamins> At least, as far as I can tell, adding a primary key leaves 
   the InnoDB indexes incorrect.
<@rangi> dont use auto_increment to number them, just select all, set the
 reservenumber
<@rangi> thats easy to fix
<@rangi> you just tell it to optimize the table
< jcamins> Ah.
<@rangi> the classy thing to do would be to do
<@rangi> if mysql
<@rangi> optimize reserves

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/

[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-02-26 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Nicole C. Engard  changed:

   What|Removed |Added

 CC||neng...@gmail.com
 AssignedTo|koha.sek...@gmail.com   |kyle.m.h...@gmail.com

-- 
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.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-02-21 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

Kyle M Hall  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff
 CC||kyle.m.h...@gmail.com

-- 
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.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 7065] reserves table needs a primary key

2012-02-21 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

--- Comment #1 from Kyle M Hall  2012-02-21 17:37:11 UTC 
---
Created attachment 7789
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7789
Bug 7065 - reserves table needs a primary key

Adds the primary key reservenumber to reserves and old_reserves.

-- 
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.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/