Eli Mesika has uploaded a new change for review. Change subject: core: PG 8.4 compatibility ......................................................................
core: PG 8.4 compatibility This patch fixes changes made in commit 556dce569de0a5e5475ebe5b986fa71bb1f2d77e The simple solution is to add the missing columns in the create table which is re-entrant and not adding another script New installs will create the table with all columns and all the fn_db_add_column calls after that for that table will be ignored current installations doing upgrade, will skip the table creation as it already exists and run the upgrade script Change-Id: I31225090521f087fb8a4572e869396b19f310a0d Signed-off-by: Eli Mesika <[email protected]> --- M backend/manager/dbscripts/upgrade/pre_upgrade/0030_add_materialized_views_table.sql D backend/manager/dbscripts/upgrade/pre_upgrade/0040_materialized_views_extensions.sql 2 files changed, 4 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/40/12140/1 diff --git a/backend/manager/dbscripts/upgrade/pre_upgrade/0030_add_materialized_views_table.sql b/backend/manager/dbscripts/upgrade/pre_upgrade/0030_add_materialized_views_table.sql index 2fac481..1efc6ab 100644 --- a/backend/manager/dbscripts/upgrade/pre_upgrade/0030_add_materialized_views_table.sql +++ b/backend/manager/dbscripts/upgrade/pre_upgrade/0030_add_materialized_views_table.sql @@ -9,7 +9,10 @@ v_name NAME NOT NULL, refresh_rate_in_sec INTEGER, last_refresh TIMESTAMP WITH TIME ZONE, - avg_cost_ms int not null default 0 + avg_cost_ms int not null default 0, + min_refresh_rate_in_sec int default 0, + custom boolean default false, + active boolean default true ); END IF; END; $procedure$ diff --git a/backend/manager/dbscripts/upgrade/pre_upgrade/0040_materialized_views_extensions.sql b/backend/manager/dbscripts/upgrade/pre_upgrade/0040_materialized_views_extensions.sql deleted file mode 100644 index a3d2260..0000000 --- a/backend/manager/dbscripts/upgrade/pre_upgrade/0040_materialized_views_extensions.sql +++ /dev/null @@ -1,6 +0,0 @@ --- Determines the minimum duration we will have to wait between 2 refreshes , 0 means : no wait -select fn_db_add_column('materialized_views', 'min_refresh_rate_in_sec', 'int default 0'); --- Indicates if this is a product view or custom view -select fn_db_add_column('materialized_views', 'custom', 'boolean default false'); --- Indicates if this materialized_view is currently active -select fn_db_add_column('materialized_views', 'active', 'boolean default true'); -- To view, visit http://gerrit.ovirt.org/12140 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31225090521f087fb8a4572e869396b19f310a0d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
