import { MigrationInterface, QueryRunner } from "typeorm";

export class Migrations1753184639272 implements MigrationInterface {
    name = 'Migrations1753184639272'

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`CREATE TABLE "error_logs" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "module" character varying NOT NULL, "errorType" character varying NOT NULL, "message" text NOT NULL, "stackTrace" text, "context" jsonb, "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_6840885d7eb78406fa7d358be72" PRIMARY KEY ("id"))`);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`DROP TABLE "error_logs"`);
    }

}
