Add field create and delete migration to metadata sync (#2942)

add field create and delete migration to metadata sync
This commit is contained in:
Weiko
2023-12-11 17:42:09 +01:00
committed by GitHub
parent b9de9f1a08
commit d2a42c14d2
4 changed files with 83 additions and 4 deletions

View File

@ -9,6 +9,7 @@ export enum WorkspaceMigrationColumnActionType {
CREATE = 'CREATE',
ALTER = 'ALTER',
RELATION = 'RELATION',
DROP = 'DROP',
}
export type WorkspaceMigrationEnum = string | { from: string; to: string };
@ -41,12 +42,18 @@ export type WorkspaceMigrationColumnRelation = {
isUnique?: boolean;
};
export type WorkspaceMigrationColumnDrop = {
action: WorkspaceMigrationColumnActionType.DROP;
columnName: string;
};
export type WorkspaceMigrationColumnAction = {
action: WorkspaceMigrationColumnActionType;
} & (
| WorkspaceMigrationColumnCreate
| WorkspaceMigrationColumnAlter
| WorkspaceMigrationColumnRelation
| WorkspaceMigrationColumnDrop
);
export type WorkspaceMigrationTableAction = {