Eli Mesika has submitted this change and it was merged.
Change subject: core: DB upgrade from 3.0 to 3.1 fails(#880350)
......................................................................
core: DB upgrade from 3.0 to 3.1 fails(#880350)
upgrade from 3.0.x to 3.1 failed in 2 points ;
1) 03_01_0950
Reason : script assumes that a storage is in only one DC and attempt to
insert duplicate rows that violates primary key to the permission table
Solution: check before inserting to permissions table that record with
the same key does not exist
2) 03_01_1020
Reason :script adds a column_id column to the async_tasks table.
Since this column type is UUID and is defined as NOT NULL, the addition
will fail if at the point that this upgrade script is running the table
is not empty
Solution : Create the column with an empty UUID (00000.....000000)
DEFAULT
After this column was added , drop the default.
Change-Id: Id9658673c16610da4a25e33c7969bcde61a64259
Signed-off-by: Eli Mesika <emesika(a)redhat.com>
---
M backend/manager/dbscripts/upgrade/03_01_0950_add_permissions_on_storage_to_users.sql
M backend/manager/dbscripts/upgrade/03_01_1020_add_command_id_to_async_tasks_table.sql
2 files changed, 14 insertions(+), 3 deletions(-)
Approvals:
Eli Mesika: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/9500
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id9658673c16610da4a25e33c7969bcde61a64259
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs(a)redhat.com>