correct to prior action_logs patch

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Galen Charlton 2007-10-30 19:16:48 -05:00 committed by Joshua Ferraro
parent bd40bee1aa
commit 7c439c7255

View file

@ -510,7 +510,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("ALTER TABLE action_logs ADD KEY timestamp (timestamp,user)");
$dbh->do("ALTER TABLE action_logs ADD action_id INT(11) NOT NULL FIRST");
$dbh->do("UPDATE action_logs SET action_id = if (@a, @a:=@a+1, @a:=1)");
$dbh->do("ALTER TABLE action_logs MODIFY action_id AUTO_INCREMENT PRIMARY KEY");
$dbh->do("ALTER TABLE action_logs MODIFY action_id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY");
print "Upgrade to $DBversion done (added column to action_logs)\n";
SetVersion ($DBversion);
}