mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-26 07:57:17 +00:00
32 lines
742 B
TypeScript
32 lines
742 B
TypeScript
|
|
import { MigrationInterface, QueryRunner, Table } from 'typeorm';
|
||
|
|
|
||
|
|
export class CreateFiles1651056032050 implements MigrationInterface {
|
||
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.createTable(
|
||
|
|
new Table({
|
||
|
|
name: 'files',
|
||
|
|
columns: [
|
||
|
|
{
|
||
|
|
name: 'id',
|
||
|
|
type: 'uuid',
|
||
|
|
isGenerated: true,
|
||
|
|
default: 'gen_random_uuid()',
|
||
|
|
isPrimary: true,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: 'data',
|
||
|
|
type: 'bytea',
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: 'filename',
|
||
|
|
type: 'varchar',
|
||
|
|
},
|
||
|
|
],
|
||
|
|
}),
|
||
|
|
true
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
public async down(queryRunner: QueryRunner): Promise<void> {}
|
||
|
|
}
|