Commit e1c99d8aa91785311ecf14836897e0bdfa2627e3

Authored by kevin_fourie
1 parent cbb528de

Merged in from DEV trunk...

KTS-3556
"The auto increment DB script must run first on upgrading"
Fixed. Added update statements to get past 0 id values in plugins and upgrades tables.

Committed by: Kevin Fourie
Reviewed by: Conrad Vermeulen


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@9045 c91229c3-7414-0410-bfa2-8a42b809f60b
sql/mysql/upgrade/3.5.3/add_autoinc-5.sql
1   -update plugins set id = id + 1;
2   -update upgrades set id = id + 1;
  1 +select @id :=max(id)+1 from plugins;
  2 +update plugins set id = @id where id = 0;
  3 +select @id :=max(id)+1 from upgrades;
  4 +update upgrades set id = @id where id = 0;
3 5 alter table active_sessions change `id` `id` int (11) NOT NULL AUTO_INCREMENT;
4 6 alter table archive_restoration_request change `id` `id` int (11) NOT NULL AUTO_INCREMENT;
5 7 alter table archiving_settings change `id` `id` int (11) NOT NULL AUTO_INCREMENT;
... ... @@ -78,4 +80,4 @@ alter table workflow_state_permission_assignments change `id` `id` int (11) NOT
78 80 alter table workflow_states change `id` `id` int (11) NOT NULL AUTO_INCREMENT;
79 81 alter table workflow_transitions change `id` `id` int (11) NOT NULL AUTO_INCREMENT;
80 82 alter table workflow_trigger_instances change `id` `id` int (11) NOT NULL AUTO_INCREMENT;
81   -alter table workflows change `id` `id` int (11) NOT NULL AUTO_INCREMENT;
82 83 \ No newline at end of file
  84 +alter table workflows change `id` `id` int (11) NOT NULL AUTO_INCREMENT;
... ...