diff --git a/sql/mysql/upgrade/3.5.3/add_autoinc-5.sql b/sql/mysql/upgrade/3.5.3/add_autoinc-5.sql index 6d34b65..7f5a472 100644 --- a/sql/mysql/upgrade/3.5.3/add_autoinc-5.sql +++ b/sql/mysql/upgrade/3.5.3/add_autoinc-5.sql @@ -1,5 +1,7 @@ -update plugins set id = id + 1; -update upgrades set id = id + 1; +select @id :=max(id)+1 from plugins; +update plugins set id = @id where id = 0; +select @id :=max(id)+1 from upgrades; +update upgrades set id = @id where id = 0; alter table active_sessions change `id` `id` int (11) NOT NULL AUTO_INCREMENT; alter table archive_restoration_request change `id` `id` int (11) NOT NULL AUTO_INCREMENT; 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 alter table workflow_states change `id` `id` int (11) NOT NULL AUTO_INCREMENT; alter table workflow_transitions change `id` `id` int (11) NOT NULL AUTO_INCREMENT; alter table workflow_trigger_instances change `id` `id` int (11) NOT NULL AUTO_INCREMENT; -alter table workflows change `id` `id` int (11) NOT NULL AUTO_INCREMENT; \ No newline at end of file +alter table workflows change `id` `id` int (11) NOT NULL AUTO_INCREMENT;