2023-02-15 21:04:23 -08:00
|
|
|
-- Unique constraint for user email address
|
|
|
|
ALTER TABLE user_entity
|
|
|
|
ADD UNIQUE (email);
|
2023-02-21 00:43:45 +05:30
|
|
|
|
|
|
|
|
|
|
|
-- Remove classificationName in BigQuery
|
2023-02-23 15:42:40 +05:30
|
|
|
UPDATE dbservice_entity SET json = json #- '{connection,config,classificationName}' where serviceType in ('BigQuery');
|
|
|
|
|
|
|
|
-- migrate ingestAllDatabases in postgres
|
|
|
|
UPDATE dbservice_entity de2
|
|
|
|
SET json = JSONB_SET(
|
|
|
|
json || JSONB_SET(json,'{connection,config}', json#>'{connection,config}'||
|
|
|
|
jsonb_build_object('database',
|
|
|
|
(SELECT 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'::jsonb
|
|
|
|
)
|
|
|
|
WHERE de2.serviceType = 'Postgres'
|
|
|
|
AND json->>'{connection,config,database}' IS NULL;
|