Shirly Radco has posted comments on this change. Change subject: history: sync users data for user usage tables ......................................................................
Patch Set 5: (7 comments) http://gerrit.ovirt.org/#/c/27338/5/packaging/dbscripts/create_views_3_5.sql File packaging/dbscripts/create_views_3_5.sql: Line 513: a.vm_ip as vm_ip, Line 514: a.vm_client_ip, Line 515: a.currently_running_on_host as currently_running_on_host, Line 516: a.current_user_id as current_user_id, Line 517: a.current_user_name as current_user_name, > You should remove user name and only leave user ID in all the views. Done Line 518: a.user_logged_in_to_guest, Line 519: b.disks_usage as disks_usage, Line 520: a.vm_configuration_version as vm_configuration_version, Line 521: a.current_host_configuration_version as current_host_configuration_version Line 840: FROM vm_device_history Line 841: WHERE history_id in (SELECT max(a.history_id) FROM vm_device_history as a GROUP BY a.vm_id, a.device_id) Line 842: and delete_date IS NULL; Line 843: Line 844: CREATE OR REPLACE VIEW v3_5_history_users > should be named in same formats as tags: Done Line 845: AS Line 846: SELECT Line 847: history_id, Line 848: user_id, Line 859: update_date, Line 860: delete_date Line 861: FROM users_history; Line 862: Line 863: CREATE OR REPLACE VIEW v3_5_latest_users > v3_5_latest_users_details Done Line 864: AS Line 865: SELECT Line 866: history_id, Line 867: user_id, http://gerrit.ovirt.org/#/c/27338/5/packaging/dbscripts/upgrade/03_05_0020_add_users_history_table.sql File packaging/dbscripts/upgrade/03_05_0020_add_users_history_table.sql: Line 1: CREATE TABLE users_history > naming should match view. Done Line 2: ( Line 3: history_id INTEGER DEFAULT NEXTVAL('configuration_seq') primary key NOT NULL, Line 4: history_datetime DATE NOT NULL, Line 5: user_id uuid NOT NULL, Line 1: CREATE TABLE users_history Line 2: ( Line 3: history_id INTEGER DEFAULT NEXTVAL('configuration_seq') primary key NOT NULL, Line 4: history_datetime DATE NOT NULL, Line 5: user_id uuid NOT NULL, > Please Foreign key from this field to all the tables Done Line 6: first_name character varying(255), Line 7: last_name character varying(255), Line 8: domain character varying(255) NOT NULL, Line 9: username character varying(255) NOT NULL, http://gerrit.ovirt.org/#/c/27338/5/tos_project/process/ConfigurationSync_3.5.item File tos_project/process/ConfigurationSync_3.5.item: Line 7853: <column comment="" key="false" length="10" name="history_id" nullable="true" pattern="" precision="0" sourceType="INT4" type="id_Integer" usefulColumn="true"/> Line 7854: <column comment="" key="false" name="vm_disk_join_id" nullable="true" pattern="" sourceType="" type="id_String" usefulColumn="true"/> Line 7855: </metadata> Line 7856: </node> Line 7857: <node componentName="tJDBCInput" componentVersion="0.102" offsetLabelX="0" offsetLabelY="0" posX="3840" posY="192"> > The order here needs to change since after add foreign keys things will not Done Line 7858: <elementParameter field="TEXT" name="UNIQUE_NAME" value="tJDBCInput_9"/> Line 7859: <elementParameter field="CHECK" name="END_OF_FLOW" value="false"/> Line 7860: <elementParameter field="CHECK" name="USE_EXISTING_CONNECTION" value="true"/> Line 7861: <elementParameter field="COMPONENT_LIST" name="CONNECTION" value="tJDBCConnection_1"/> Line 7995: <elementParameter field="TEXT" name="DRIVER_CLASS" value=""""/> Line 7996: <elementParameter field="TEXT" name="USER" value=""""/> Line 7997: <elementParameter field="TEXT" name="PASS" value=""""/> Line 7998: <elementParameter field="TEXT" name="TABLE" value=""users_history""/> Line 7999: <elementParameter field="CLOSED_LIST" name="DATA_ACTION" value="INSERT"/> > I would change this to UPDATE and only keep latest with deleted, since it's Done Line 8000: <elementParameter field="CHECK" name="CLEAR_TABLE" value="false"/> Line 8001: <elementParameter field="CHECK" name="DIE_ON_ERROR" value="true"/> Line 8002: <elementParameter field="LABEL" name="NOTE" value="This option only applies when deploying and running in the Talend Runtime"/> Line 8003: <elementParameter field="CHECK" name="SPECIFY_DATASOURCE_ALIAS" value="false"/> -- To view, visit http://gerrit.ovirt.org/27338 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id236a3112947e00a58175f0361d44afda692b894 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-dwh Gerrit-Branch: master Gerrit-Owner: Shirly Radco <sra...@redhat.com> Gerrit-Reviewer: Shirly Radco <sra...@redhat.com> Gerrit-Reviewer: Yaniv Dary <yd...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches