mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
40 lines
963 B
TypeScript
40 lines
963 B
TypeScript
import { MigrationInterface, QueryRunner, Table, TableForeignKey, TableIndex } from "typeorm";
|
|
|
|
export class CreateCredentials1625814801421 implements MigrationInterface {
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.createTable(new Table({
|
|
name: "credentials",
|
|
columns: [
|
|
{
|
|
name: "id",
|
|
type: "uuid",
|
|
isGenerated: true,
|
|
default: "gen_random_uuid()",
|
|
isPrimary: true
|
|
},
|
|
{
|
|
name: "value_ciphertext",
|
|
type: "varchar",
|
|
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> {
|
|
}
|
|
|
|
}
|