mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-30 00:48:52 +00:00
* Added migration steps to delete profiler pipeline from entity relationship * Added migration to remove rows from entity_relationship with profiler pipelines * Fixed sample data TestDefinition name after renaming testDefinition * Added user_tokens table to v005 Co-authored-by: mohitdeuex <mohit.y@deuexsolutions.com>
This commit is contained in:
parent
1128d4847d
commit
e22036cc09
@ -116,12 +116,3 @@ DELETE FROM policy_entity;
|
||||
DELETE FROM field_relationship WHERE fromType IN ('role', 'policy') OR toType IN ('role', 'policy');
|
||||
DELETE FROM entity_relationship WHERE fromEntity IN ('role', 'policy') OR toEntity IN ('role', 'policy');
|
||||
ALTER TABLE role_entity DROP COLUMN defaultRole;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS user_tokens (
|
||||
token VARCHAR(36) GENERATED ALWAYS AS (json ->> '$.token') STORED NOT NULL,
|
||||
userId VARCHAR(36) GENERATED ALWAYS AS (json ->> '$.userId') STORED NOT NULL,
|
||||
tokenType VARCHAR(50) GENERATED ALWAYS AS (json ->> '$.tokenType') STORED NOT NULL,
|
||||
json JSON NOT NULL,
|
||||
expiryDate BIGINT UNSIGNED GENERATED ALWAYS AS (json ->> '$.expiryDate') NOT NULL,
|
||||
PRIMARY KEY (token)
|
||||
);
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
DELETE FROM entity_relationship
|
||||
WHERE toEntity = 'ingestionPipeline'
|
||||
AND toId NOT IN (
|
||||
SELECT DISTINCT id
|
||||
FROM ingestion_pipeline_entity
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS user_tokens (
|
||||
token VARCHAR(36) GENERATED ALWAYS AS (json ->> '$.token') STORED NOT NULL,
|
||||
userId VARCHAR(36) GENERATED ALWAYS AS (json ->> '$.userId') STORED NOT NULL,
|
||||
tokenType VARCHAR(50) GENERATED ALWAYS AS (json ->> '$.tokenType') STORED NOT NULL,
|
||||
json JSON NOT NULL,
|
||||
expiryDate BIGINT UNSIGNED GENERATED ALWAYS AS (json ->> '$.expiryDate') NOT NULL,
|
||||
PRIMARY KEY (token)
|
||||
);
|
||||
@ -110,13 +110,4 @@ DELETE FROM role_entity;
|
||||
DELETE FROM policy_entity;
|
||||
DELETE FROM field_relationship WHERE fromType IN ('role', 'policy') OR toType IN ('role', 'policy');
|
||||
DELETE FROM entity_relationship WHERE fromEntity IN ('role', 'policy') OR toEntity IN ('role', 'policy');
|
||||
ALTER TABLE role_entity DROP COLUMN defaultRole;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS user_tokens (
|
||||
token VARCHAR(36) GENERATED ALWAYS AS (json ->> 'token') STORED NOT NULL,
|
||||
userId VARCHAR(36) GENERATED ALWAYS AS (json ->> 'userId') STORED NOT NULL,
|
||||
tokenType VARCHAR(50) GENERATED ALWAYS AS (json ->> 'tokenType') STORED NOT NULL,
|
||||
json JSONB NOT NULL,
|
||||
expiryDate BIGINT GENERATED ALWAYS AS ((json ->> 'expiryDate')::bigint) STORED NOT NULL,
|
||||
PRIMARY KEY (token)
|
||||
);
|
||||
ALTER TABLE role_entity DROP COLUMN defaultRole;
|
||||
@ -0,0 +1,15 @@
|
||||
DELETE FROM entity_relationship
|
||||
WHERE toEntity = 'ingestionPipeline'
|
||||
AND toId NOT IN (
|
||||
SELECT DISTINCT id
|
||||
FROM ingestion_pipeline_entity
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS user_tokens (
|
||||
token VARCHAR(36) GENERATED ALWAYS AS (json ->> 'token') STORED NOT NULL,
|
||||
userId VARCHAR(36) GENERATED ALWAYS AS (json ->> 'userId') STORED NOT NULL,
|
||||
tokenType VARCHAR(50) GENERATED ALWAYS AS (json ->> 'tokenType') STORED NOT NULL,
|
||||
json JSONB NOT NULL,
|
||||
expiryDate BIGINT GENERATED ALWAYS AS ((json ->> 'expiryDate')::bigint) STORED NOT NULL,
|
||||
PRIMARY KEY (token)
|
||||
);
|
||||
@ -74,7 +74,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"result": "columnCount should not be None for TableColumnCountToEqual",
|
||||
"result": "columnCount should not be None for tableColumnCountToEqual",
|
||||
"testCaseStatus": "Aborted",
|
||||
"testResultValues": [
|
||||
{
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"name": "table_column_count_equals",
|
||||
"description": "test the number of column in table",
|
||||
"entityLink": "<#E::table::sample_data.ecommerce_db.shopify.dim_address>",
|
||||
"testDefinitionName": "TableColumnCountToEqual",
|
||||
"testDefinitionName": "tableColumnCountToEqual",
|
||||
"parameterValues": [
|
||||
{
|
||||
"name": "columnCount",
|
||||
@ -21,7 +21,7 @@
|
||||
"name": "table_column_count_between",
|
||||
"description": "test the number of column in table is between x and y",
|
||||
"entityLink": "<#E::table::sample_data.ecommerce_db.shopify.dim_address>",
|
||||
"testDefinitionName": "TableColumnCountToBeBetween",
|
||||
"testDefinitionName": "tableColumnCountToBeBetween",
|
||||
"parameterValues": [
|
||||
{
|
||||
"name": "minColValue",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user