mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-25 23:01:12 +03:00
22 lines
823 B
TypeScript
22 lines
823 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
|
|
export class AddVariableEntity1699325775451 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`CREATE TABLE IF NOT EXISTS variable (
|
|
id uuid NOT NULL DEFAULT uuid_generate_v4(),
|
|
"name" varchar NOT NULL,
|
|
"value" text NOT NULL,
|
|
"type" text NULL,
|
|
"createdDate" timestamp NOT NULL DEFAULT now(),
|
|
"updatedDate" timestamp NOT NULL DEFAULT now(),
|
|
CONSTRAINT "PK_98419043dd704f54-9830ab78f8" PRIMARY KEY (id)
|
|
);`
|
|
)
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`DROP TABLE variable`)
|
|
}
|
|
}
|