Files
zod-backend/src/db/migrations/1731310840593-create-template-table.ts
Oracle Public Cloud User 05872b5170 feat:mvp1 initial commit
2024-11-21 06:07:08 +00:00

21 lines
720 B
TypeScript

import { MigrationInterface, QueryRunner } from 'typeorm';
export class CreateTemplateTable1731310840593 implements MigrationInterface {
name = 'CreateTemplateTable1731310840593';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`CREATE TABLE "template" (
"id" SERIAL,
"name" character varying(255) NOT NULL,
"createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
"updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
CONSTRAINT "PK_ac51aa5181ee2036f5ca482857d" PRIMARY KEY ("id"))`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP TABLE "template"`);
}
}