mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
41 lines
943 B
TypeScript
41 lines
943 B
TypeScript
import { MigrationInterface, QueryRunner, Table, TableForeignKey, TableIndex } from "typeorm";
|
|
|
|
export class CreateMetadata1625814801424 implements MigrationInterface {
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.createTable(new Table({
|
|
name: "metadata",
|
|
columns: [
|
|
{
|
|
name: "id",
|
|
type: "uuid",
|
|
isGenerated: true,
|
|
default: "gen_random_uuid()",
|
|
isPrimary: true
|
|
},
|
|
{
|
|
name: "data",
|
|
type: "json",
|
|
isNullable: true
|
|
},
|
|
{
|
|
name: "created_at",
|
|
type: "timestamp",
|
|
isNullable: true,
|
|
default: "now()"
|
|
},
|
|
{
|
|
name: "updated_at",
|
|
type: "timestamp",
|
|
isNullable: true,
|
|
default: "now()"
|
|
}
|
|
]
|
|
}), true)
|
|
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
}
|
|
|
|
}
|