15 lines
756 B
TypeScript
15 lines
756 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class Initial1770020781006 implements MigrationInterface {
|
|
name = 'Initial1770020781006'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`CREATE TABLE "entries" ("uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "id" SERIAL NOT NULL, "title" character varying NOT NULL DEFAULT '', "description" character varying NOT NULL DEFAULT '', "source" character varying NOT NULL DEFAULT '', "sourceUrl" character varying NOT NULL DEFAULT '', CONSTRAINT "PK_8640855ae82083455cbb806173d" PRIMARY KEY ("id"))`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`DROP TABLE "entries"`);
|
|
}
|
|
|
|
}
|