OpenMetadata/bootstrap/sql/org.postgresql.Driver/v002__create_db_connection_info.sql
Suresh Srinivas 9d25596227
Fixes #5122 Add backend and API support for column-level lineage (#5123)
* Fixes #5122 Add backend and API support for column-level lineage

* amend

* Fix test failures
2022-05-24 16:00:12 -07:00

16 lines
614 B
SQL

CREATE TABLE IF NOT EXISTS type_entity (
id VARCHAR(36) GENERATED ALWAYS AS (json ->> 'id') STORED NOT NULL,
name VARCHAR(256) GENERATED ALWAYS AS (json ->> 'name') STORED NOT NULL,
category VARCHAR(256) GENERATED ALWAYS AS (json ->> 'category') STORED NOT NULL,
json JSONB NOT NULL,
updatedAt BIGINT GENERATED ALWAYS AS ((json ->> 'updatedAt')::bigint) STORED NOT NULL,
updatedBy VARCHAR(256) GENERATED ALWAYS AS (json ->> 'updatedBy') STORED NOT NULL,
PRIMARY KEY (id),
UNIQUE (name)
);
ALTER TABLE webhook_entity
DROP COLUMN deleted;
DROP INDEX entity_relationship_edge_index;