waltz-2398
add update using join attestation query for specific database vendors.
<changeSet id="20191203-4537-4"
author="muzammilali"
- dbms="mysql,postgresql,h2">
+ dbms="postgresql">
<comment>4537: copying attested_entity_kind from attestation_run to attestation_instance</comment>
<sql>
UPDATE attestation_instance
</sql>
</changeSet>
+ <changeSet id="20191203-4537-4"
+ author="muzammilali"
+ dbms="mysql">
+ <comment>4537: copying attested_entity_kind from attestation_run to attestation_instance</comment>
+ <sql>
+ UPDATE attestation_instance, attestation_run
+ SET attestation_instance.attested_entity_kind = attestation_run.attested_entity_kind
+ WHERE attestation_run.id = inst.attestation_run_id
+ </sql>
+ </changeSet>
+
+ <changeSet id="20191203-4537-4"
+ author="muzammilali"
+ dbms="h2">
+ <comment>4537: copying attested_entity_kind from attestation_run to attestation_instance</comment>
+ <sql>
+ UPDATE attestation_instance instance
+ SET instance.attested_entity_kind =
+ (select run.attested_entity_kind from attestation_run run where run.id = instance.attestation_run_id)
+ WHERE EXISTS
+ (select * from attestation_run run where run.id = instance.attestation_run_id)
+ </sql>
+ </changeSet>
+
<changeSet id="20191203-4537-5"
author="muzammilali">
<comment>4537: Added not null constraint for attested_entity_knd in attestation_instance table</comment>
