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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 3 16:06:30 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7065

--- Comment #12 from Kyle M Hall <kyle.m.hall at gmail.com> ---
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.


More information about the Koha-bugs mailing list