OpenMetadata/bootstrap/sql/com.mysql.cj.jdbc.Driver/v009__create_db_connection_info.sql

28 lines
855 B
MySQL
Raw Normal View History

-- Unique constraint for user email address
ALTER TABLE user_entity
2023-02-21 00:43:45 +05:30
ADD UNIQUE (email);
-- Remove classificationName in BigQuery
UPDATE dbservice_entity
SET json = JSON_REMOVE(json, '$.connection.config.classificationName') where serviceType in ('BigQuery');
-- migrate ingestAllDatabases in postgres
UPDATE dbservice_entity de2
SET json = JSON_REPLACE(
JSON_INSERT(json,
'$.connection.config.database',
(select JSON_EXTRACT(json, '$.name')
from database_entity de
where id = (select er.toId
from entity_relationship er
where er.fromId = de2.id
and er.toEntity = 'database'
LIMIT 1
))
), '$.connection.config.ingestAllDatabases',
true
)
where de2.serviceType = 'Postgres'
and JSON_EXTRACT(json, '$.connection.config.database') is NULL