Change in ovirt-engine[master]: db: format SQL files

emesika at redhat.com emesika at redhat.com
Mon Nov 16 12:54:15 UTC 2015


Eli Mesika has submitted this change and it was merged.

Change subject: db: format SQL files
......................................................................


db: format SQL files

Introduce basic SQL formatting and apply on all scripts in dbscripts
directory.

This is done in order to ease gerrit reviews on DB scripts and make code
more readable.

Main issues addressed

1) Making a change noticeable in a code line (for example splitting
column names, values and parameters each in a separate line

2) Code alignment

3) Keywords in uppercase

Work was mainly done using http://poorsql.com/

Next step would be to find a way to automate either formatting or
validation

See [1] for formatting rules applied in this patch

[1] http://www.ovirt.org/index.php?title=OVirt-DB-Issues/formatting

Change-Id: I19cc61bad1f11fcf9d7d2c5d2a55ced7758ee3da
Signed-off-by: emesika <emesika at redhat.com>
---
M packaging/dbscripts/action_version_map_sp.sql
M packaging/dbscripts/ad_groups_sp.sql
M packaging/dbscripts/affinity_groups_sp.sql
M packaging/dbscripts/all_disks_sp.sql
M packaging/dbscripts/async_tasks_sp.sql
M packaging/dbscripts/audit_log_sp.sql
M packaging/dbscripts/base_disks_sp.sql
M packaging/dbscripts/bookmarks_sp.sql
M packaging/dbscripts/business_entity_snapshot_sp.sql
M packaging/dbscripts/cluster_features_sp.sql
M packaging/dbscripts/cluster_policy_sp.sql
M packaging/dbscripts/command_entities_sp.sql
M packaging/dbscripts/common_sp.sql
M packaging/dbscripts/cpu_profiles_sp.sql
M packaging/dbscripts/create_dwh_views.sql
M packaging/dbscripts/create_functions.sql
M packaging/dbscripts/create_views.sql
M packaging/dbscripts/custom_actions_sp.sql
M packaging/dbscripts/disk_image_dynamic_sp.sql
M packaging/dbscripts/disk_images_sp.sql
M packaging/dbscripts/disk_lun_map_sp.sql
M packaging/dbscripts/disk_profiles_sp.sql
M packaging/dbscripts/drop_db.sql
M packaging/dbscripts/dwh_history_timekeeping_sp.sql
M packaging/dbscripts/dwh_translation_tables_sp.sql
M packaging/dbscripts/engine_backup_log_sp.sql
M packaging/dbscripts/engine_sessions_sp.sql
M packaging/dbscripts/event_sp.sql
M packaging/dbscripts/external_variable_sp.sql
M packaging/dbscripts/fence_agents_sp.sql
M packaging/dbscripts/gluster_georep_sp.sql
M packaging/dbscripts/gluster_hooks_sp.sql
M packaging/dbscripts/gluster_server_sp.sql
M packaging/dbscripts/gluster_services_sp.sql
M packaging/dbscripts/gluster_volume_snapshot_schedule_sp.sql
M packaging/dbscripts/gluster_volume_snapshot_sp.sql
M packaging/dbscripts/gluster_volumes_sp.sql
M packaging/dbscripts/host_device_sp.sql
M packaging/dbscripts/image_storage_domain_map_sp.sql
M packaging/dbscripts/images_sp.sql
M packaging/dbscripts/inst_sp.sql
M packaging/dbscripts/iscsi_bonds_sp.sql
M packaging/dbscripts/job_sp.sql
M packaging/dbscripts/libvirt_secrets_sp.sql
M packaging/dbscripts/mac_pools_sp.sql
M packaging/dbscripts/materialized_views_sp.sql
M packaging/dbscripts/multi_level_administration_sp.sql
M packaging/dbscripts/network_sp.sql
M packaging/dbscripts/numa_sp.sql
M packaging/dbscripts/policy_unit_sp.sql
M packaging/dbscripts/providers_sp.sql
M packaging/dbscripts/qos_sp.sql
M packaging/dbscripts/quota_sp.sql
M packaging/dbscripts/repo_files_meta_data_sp.sql
M packaging/dbscripts/snapshots_sp.sql
M packaging/dbscripts/storage_device_sp.sql
M packaging/dbscripts/storages_san_sp.sql
M packaging/dbscripts/storages_sp.sql
M packaging/dbscripts/system_statistics_sp.sql
M packaging/dbscripts/tags_sp.sql
M packaging/dbscripts/tags_vm_pool_map_sp.sql
M packaging/dbscripts/unregistered_OVF_data_sp.sql
M packaging/dbscripts/user_profiles_sp.sql
M packaging/dbscripts/user_sp.sql
M packaging/dbscripts/vdc_option_sp.sql
M packaging/dbscripts/vds_groups_sp.sql
M packaging/dbscripts/vds_kdump_status_sp.sql
M packaging/dbscripts/vds_sp.sql
M packaging/dbscripts/vds_spm_id_map_sp.sql
M packaging/dbscripts/vm_device_sp.sql
M packaging/dbscripts/vm_icons_sp.sql
M packaging/dbscripts/vm_jobs_sp.sql
M packaging/dbscripts/vm_pool_maps_sp.sql
M packaging/dbscripts/vm_pools_sp.sql
M packaging/dbscripts/vm_templates_sp.sql
M packaging/dbscripts/vms_sp.sql
76 files changed, 21,220 insertions(+), 15,989 deletions(-)

Approvals:
  Martin Peřina: Looks good to me, but someone else must approve
  Eli Mesika: Verified; Passed CI tests
  Moti Asayag: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/47262
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I19cc61bad1f11fcf9d7d2c5d2a55ced7758ee3da
Gerrit-PatchSet: 16
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: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list