diff --git a/bootstrap/sql/com.mysql.cj.jdbc.Driver/v013__create_db_connection_info.sql b/bootstrap/sql/com.mysql.cj.jdbc.Driver/v013__create_db_connection_info.sql index 1409de95656..d8996aef14a 100644 --- a/bootstrap/sql/com.mysql.cj.jdbc.Driver/v013__create_db_connection_info.sql +++ b/bootstrap/sql/com.mysql.cj.jdbc.Driver/v013__create_db_connection_info.sql @@ -344,4 +344,18 @@ SET json = JSON_INSERT( ) ) ) -WHERE name = 'tableCustomSQLQuery'; \ No newline at end of file +WHERE name = 'tableCustomSQLQuery'; + +-- Modify migrations for service connection of airflow to move password under authType if +-- Connection Type as Mysql or Postgres + +UPDATE pipeline_service_entity +SET json = JSON_INSERT( + JSON_REMOVE(json, '$.connection.config.connection.password'), + '$.connection.config.connection.authType', + JSON_OBJECT(), + '$.connection.config.connection.authType.password', + JSON_EXTRACT(json, '$.connection.config.connection.password')) +where serviceType = 'Airflow' +AND JSON_EXTRACT(json, '$.connection.config.connection.type') in ('Postgres', 'Mysql') +AND JSON_EXTRACT(json, '$.connection.config.connection.password') IS NOT NULL; diff --git a/bootstrap/sql/org.postgresql.Driver/v013__create_db_connection_info.sql b/bootstrap/sql/org.postgresql.Driver/v013__create_db_connection_info.sql index ce43694f1ae..431d2a337eb 100644 --- a/bootstrap/sql/org.postgresql.Driver/v013__create_db_connection_info.sql +++ b/bootstrap/sql/org.postgresql.Driver/v013__create_db_connection_info.sql @@ -177,3 +177,18 @@ set json = jsonb_set( '[{"name":"sqlExpression","displayName":"SQL Expression","description":"SQL expression to run against the table","dataType":"STRING","required":"true"},{"name":"strategy","displayName":"Strategy","description":"Strategy to use to run the custom SQL query (i.e. `SELECT COUNT(