Files
Flowise/packages/server/src/database/migrations/postgres/1702200925471-AddVariableEntity.ts
T
2023-12-29 15:17:26 +00:00

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`)
}
}