Change in ovirt-engine[master]: core: [db] squash 3.1 upgrade scripts
emesika at redhat.com
emesika at redhat.com
Tue Dec 31 11:58:20 UTC 2013
Eli Mesika has submitted this change and it was merged.
Change subject: core: [db] squash 3.1 upgrade scripts
......................................................................
core: [db] squash 3.1 upgrade scripts
This patch squashes all 03_01_* upgrade scripts into the main database
creation scripts.
In 3.0 , this was done manually in order not to issue too many changes
on the code base.
In 3.1, I had changed this method since we had 130 scripts to merge and
doing that manually is both time consuming and error prone.
The patch used the following method:
1) Creating a git branch and removing all upgrade scripts except those
with 03_01_*
2) Creating a new 3_1 database based on 1)
3) Using pg_dump to export 3_1 schema & data
4) Replacing the create_tables.sql with the schema file generated on 3)
5) Editing manually insert_data.sql and insert_predefined_roles.sql to
have all changes from data exported at step 3)
6) Creating a database engine_db_squash_3_1 on this patch branch
7) Creating a database engine_master on the master branch
8) Use pg_dump to export db from step 6) schema & data
9) Use pg_dump to export db from step 7) schema & data
10)Compare schema & data from steps 8) & 9)
Please note also:
1) insert_predefined_roles.sql was reformatted to use variables.
2) I had removed the ignorance of gaps in upgrade scripts in case the
script version is below 03010910.
Change-Id: I4a821e9308b9c30bf1087c9509eefa880fc92492
Signed-off-by: Eli Mesika <emesika at redhat.com>
---
M packaging/dbscripts/create_tables.sql
M packaging/dbscripts/dbfunctions.sh
M packaging/dbscripts/insert_data.sql
M packaging/dbscripts/insert_predefined_roles.sql
D packaging/dbscripts/upgrade/03_01_0010_change_action_parameters_type.sql
D packaging/dbscripts/upgrade/03_01_0030_change_vds_static_pm_password_to_text.sql
D packaging/dbscripts/upgrade/03_01_0040_add_AddPermission_to_PowerUserRole.sql
D packaging/dbscripts/upgrade/03_01_0050_add_disks_table.sql
D packaging/dbscripts/upgrade/03_01_0060_add_cancel_migration_to_action_version_map.sql
D packaging/dbscripts/upgrade/03_01_0070_populate_disks_table.sql
D packaging/dbscripts/upgrade/03_01_0090_add_template_columns_to_vm_static.sql
D packaging/dbscripts/upgrade/03_01_0100_migrate_templates_to_vm_static.sql
D packaging/dbscripts/upgrade/03_01_0110_add_vds_spm_priority_col.sql
D packaging/dbscripts/upgrade/03_01_0130_update_network_name.sql
D packaging/dbscripts/upgrade/03_01_0140_drop_vm_templates_tables.sql
D packaging/dbscripts/upgrade/03_01_0150_remove_status_from_disks.sql
D packaging/dbscripts/upgrade/03_01_0170_add_quota_tables.sql
D packaging/dbscripts/upgrade/03_01_0180_add_quota_fields.sql
D packaging/dbscripts/upgrade/03_01_0200_add_vm_device_table.sql
D packaging/dbscripts/upgrade/03_01_0210_add_hash_column_to_vm_dynamic.sql
D packaging/dbscripts/upgrade/03_01_0220_vm_device_upgrade_data.sql
D packaging/dbscripts/upgrade/03_01_0240_remove_is_shared_column_from_vm_device.sql
D packaging/dbscripts/upgrade/03_01_0260_add_job_table.sql
D packaging/dbscripts/upgrade/03_01_0270_add_job_subject_entity_table.sql
D packaging/dbscripts/upgrade/03_01_0280_add_step_table.sql
D packaging/dbscripts/upgrade/03_01_0300_vds_static_unique_fields.sql
D packaging/dbscripts/upgrade/03_01_0320_rename_audit_log_keys_from_merge_to_remove.sql
D packaging/dbscripts/upgrade/03_01_0330_add_step_id_column_to_async_task.sql
D packaging/dbscripts/upgrade/03_01_0370_vm_device_upgrade_data.sql
D packaging/dbscripts/upgrade/03_01_0380_add_correlation_and_job_to_audit_log.sql
D packaging/dbscripts/upgrade/03_01_0390_add_snapshots_table.sql
D packaging/dbscripts/upgrade/03_01_0410_remove_image_templates_table.sql
D packaging/dbscripts/upgrade/03_01_0430_add_image_domain_map_table.sql
D packaging/dbscripts/upgrade/03_01_0440_vm_device_upgrade_data.sql
D packaging/dbscripts/upgrade/03_01_0460_add_defalut_quota_column.sql
D packaging/dbscripts/upgrade/03_01_0470_add_quota_permissions.sql
D packaging/dbscripts/upgrade/03_01_0480_add_quota_consume_role.sql
D packaging/dbscripts/upgrade/03_01_0490_add_audit_log_columns.sql
D packaging/dbscripts/upgrade/03_01_0500_add_unique_name_constraint.sql
D packaging/dbscripts/upgrade/03_01_0510_add_permission_to_consume_quota.sql
D packaging/dbscripts/upgrade/03_01_0520_quota_upgrade_script.sql
D packaging/dbscripts/upgrade/03_01_0530_migrate_image_vm_pool_map.sql
D packaging/dbscripts/upgrade/03_01_0540_add_prestarted_vms_col.sql
D packaging/dbscripts/upgrade/03_01_0560_vm_device_upgrade_data.sql
D packaging/dbscripts/upgrade/03_01_0580_recoverable.sql
D packaging/dbscripts/upgrade/03_01_0600_migrate_images_to_snapshots.sql
D packaging/dbscripts/upgrade/03_01_0610_drop_stateless_vm_image_map_table.sql
D packaging/dbscripts/upgrade/03_01_0620_add_service_columns_to_vds_groups.sql
D packaging/dbscripts/upgrade/03_01_0630_add_disk_name.sql
D packaging/dbscripts/upgrade/03_01_0650_add_volume_to_audit_log.sql
D packaging/dbscripts/upgrade/03_01_0660_migrate_image_vm_map.sql
D packaging/dbscripts/upgrade/03_01_0680_add_setupnetwork_to_action_version_map.sql
D packaging/dbscripts/upgrade/03_01_0690_add_gluster_volume_tables.sql
D packaging/dbscripts/upgrade/03_01_0720_remove_unused_images_columns.sql
D packaging/dbscripts/upgrade/03_01_0730_add_empty_cd_to_vm.sql
D packaging/dbscripts/upgrade/03_01_0740_add_vm_device_soundcard.sql
D packaging/dbscripts/upgrade/03_01_0750_add_mtu_column.sql
D packaging/dbscripts/upgrade/03_01_0760_add_bridgeless_columns.sql
D packaging/dbscripts/upgrade/03_01_0770_remove_disk_type_column.sql
D packaging/dbscripts/upgrade/03_01_0780_add_action_version_map_add_vm_from_snapshot.sql
D packaging/dbscripts/upgrade/03_01_0790_resize_disk_alias_column.sql
D packaging/dbscripts/upgrade/03_01_0800_upgrade_disk_alias_name.sql
D packaging/dbscripts/upgrade/03_01_0810_update_dc_ver_add_vm_from_snapshot.sql
D packaging/dbscripts/upgrade/03_01_0830_change_disk_alias_upper_case.sql
D packaging/dbscripts/upgrade/03_01_0840_change_storage_type_all_to_new_value.sql
D packaging/dbscripts/upgrade/03_01_0850_add_gluster_transport_types.sql
D packaging/dbscripts/upgrade/03_01_0870_add_posix_fs_support_columns_to_connection.sql
D packaging/dbscripts/upgrade/03_01_0880_rename_disks_table_to_base_disks.sql
D packaging/dbscripts/upgrade/03_01_0890_add_disk_lun_map_table.sql
D packaging/dbscripts/upgrade/03_01_0910_add_shared_disk.sql
D packaging/dbscripts/upgrade/03_01_0920_remove_config_entries_from_schema_version.sql
D packaging/dbscripts/upgrade/03_01_0930_convert_spec_param_to_json.sql
D packaging/dbscripts/upgrade/03_01_0940_add_disks_roles.sql
D packaging/dbscripts/upgrade/03_01_0950_add_permissions_on_storage_to_users.sql
D packaging/dbscripts/upgrade/03_01_0960_fix_default_quota_name.sql
D packaging/dbscripts/upgrade/03_01_0970_add_addposixstorage_domain_to_action_version_map.sql
D packaging/dbscripts/upgrade/03_01_0980_add_version.sql
D packaging/dbscripts/upgrade/03_01_0990_add_dwh_to_event_map.sql
D packaging/dbscripts/upgrade/03_01_1000_gluster_role_maps.sql
D packaging/dbscripts/upgrade/03_01_1010_add_bootable_column_to_base_disk.sql
D packaging/dbscripts/upgrade/03_01_1020_add_command_id_to_async_tasks_table.sql
D packaging/dbscripts/upgrade/03_01_1030_add_allow_console_reconnect.sql
D packaging/dbscripts/upgrade/03_01_1040_add_allow_console_reconnect_permission.sql
D packaging/dbscripts/upgrade/03_01_1050_drop_license_usage_table.sql
D packaging/dbscripts/upgrade/03_01_1060_rename_luns_column.sql
D packaging/dbscripts/upgrade/03_01_1070_add_create_update_dates_to_vm_device.sql
D packaging/dbscripts/upgrade/03_01_1080_add_allow_snapshot.sql
D packaging/dbscripts/upgrade/03_01_1090_gluster_brick_option_id.sql
D packaging/dbscripts/upgrade/03_01_1100_add_inheritable_roles.sql
D packaging/dbscripts/upgrade/03_01_1110_rename_inheritable_roles_columns.sql
D packaging/dbscripts/upgrade/03_01_1120_vm_device_add_alias_column.sql
D packaging/dbscripts/upgrade/03_01_1130_update_role_allows_viewing_children_column.sql
D packaging/dbscripts/upgrade/03_01_1140_add_creator_roles.sql
D packaging/dbscripts/upgrade/03_01_1150_remove_unneeded_groups_from_disk_creator.sql
D packaging/dbscripts/upgrade/03_01_1160_add_cpu_pinning.sql
D packaging/dbscripts/upgrade/03_01_1170_remove_internal_drive_mapping_column.sql
D packaging/dbscripts/upgrade/03_01_1180_remove_and_rename_columns_vm_dynamic.sql
D packaging/dbscripts/upgrade/03_01_1190_add_port_mirroring_to_vm_interface.sql
D packaging/dbscripts/upgrade/03_01_1200_blank_template_usb_policy.sql
D packaging/dbscripts/upgrade/03_01_1210_gluster_event_map.sql
D packaging/dbscripts/upgrade/03_01_1220_add_volume_brick_order_column.sql
D packaging/dbscripts/upgrade/03_01_1230_add_login_action_group.sql
D packaging/dbscripts/upgrade/03_01_1240_add_template_owner_role.sql
D packaging/dbscripts/upgrade/03_01_1250_add_custom_props_action_group.sql
D packaging/dbscripts/upgrade/03_01_1260_remove_time_lease_vm_pool_map_table.sql
D packaging/dbscripts/upgrade/03_01_1270_add_task_idx_audit_log.sql
D packaging/dbscripts/upgrade/03_01_1280_add_async_task_entities_table.sql
D packaging/dbscripts/upgrade/03_01_1290_add_last_time_used_as_master_col.sql
D packaging/dbscripts/upgrade/03_01_1300_remove_allow_snapshot_col.sql
D packaging/dbscripts/upgrade/03_01_1310_remove_default_quota.sql
D packaging/dbscripts/upgrade/03_01_1320_update_usb_policy_of_linux_vms.sql
D packaging/dbscripts/upgrade/03_01_1330_gluster_add_host_event_map.sql
D packaging/dbscripts/upgrade/03_01_1340_add_disk_permissions_to_vm_creator_role.sql
D packaging/dbscripts/upgrade/03_01_1350_add_AddPermission_to_roles.sql
D packaging/dbscripts/upgrade/03_01_1360_add_vdsm_rpm_version_column.sql
D packaging/dbscripts/upgrade/03_01_1370_update_roles_description.sql
D packaging/dbscripts/upgrade/03_01_1380_add_ssh_key_fingerprint_column_to_vds_static.sql
D packaging/dbscripts/upgrade/03_01_1390_update_power_user_role.sql
D packaging/dbscripts/upgrade/03_01_1400_add_host_time_drift_event.sql
D packaging/dbscripts/upgrade/03_01_1410_change_storage_status.sql
D packaging/dbscripts/upgrade/03_01_1420_add_create_vm_to_vm_pool_admin.sql
D packaging/dbscripts/upgrade/03_01_1430_extend_host_mac_address_size.sql
D packaging/dbscripts/upgrade/03_01_1440_encrypt_chap_password.sh
D packaging/dbscripts/upgrade/03_01_1450_add_timestamp_to_async_tasks_and_compensation.sql
D packaging/dbscripts/upgrade/03_01_1460_add_storage_pool_id_and_task_type_to_async_tasks.sql
D packaging/dbscripts/upgrade/03_01_1470_add_smartcard.sql
D packaging/dbscripts/upgrade/03_01_1480_change_nfs_version_to_string.sql
D packaging/dbscripts/upgrade/03_01_1490_gluster_refresh_event_map.sql
D packaging/dbscripts/upgrade/03_01_1500_drop_hypervisor_type.sql
D packaging/dbscripts/upgrade/03_01_1510_drop_operation_mode.sql
D packaging/dbscripts/upgrade/03_01_1520_add_fk_vm_interface_vm_static_template.sql
D packaging/dbscripts/upgrade/03_01_1530_configure_disk_storage_action_group_changes.sql
D packaging/dbscripts/upgrade/03_01_1540_add_smartcard.sql
R packaging/dbscripts/upgrade/03_02_0000_set_version.sql
134 files changed, 2,906 insertions(+), 4,544 deletions(-)
Approvals:
Eli Mesika: Verified; Looks good to me, approved
Liran Zelkha: Looks good to me, but someone else must approve
--
To view, visit http://gerrit.ovirt.org/22817
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4a821e9308b9c30bf1087c9509eefa880fc92492
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzelkha at redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the Engine-commits
mailing list