????
Current Path : C:/inetpub/vhost/qnquyhoach.nextform.vn/api/dist/migrations/ |
Current File : C:/inetpub/vhost/qnquyhoach.nextform.vn/api/dist/migrations/1727751024056-create-audit-log-table.js |
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CreateAuditLogTable1727751024056 = void 0; class CreateAuditLogTable1727751024056 { async up(queryRunner) { return queryRunner.query(`CREATE TABLE audit_log ( "id" serial NOT NULL, "logTableName" varchar(255) not null, "logId" int4 not null, "approvedBy" int4 null, "approvedAt" timestamptz NULL, "status" varchar(50), "createdAt" timestamptz NULL DEFAULT now(), "updatedAt" timestamptz NULL DEFAULT now(), "comments" varchar NULL, CONSTRAINT audit_log_pkey PRIMARY KEY (id), UNIQUE ("logTableName", "logId"), constraint fk_audit_log_user FOREIGN KEY("approvedBy") REFERENCES public.user(id) );`); } async down(queryRunner) { return queryRunner.query('DROP TABLE audit_log'); } } exports.CreateAuditLogTable1727751024056 = CreateAuditLogTable1727751024056; //# sourceMappingURL=1727751024056-create-audit-log-table.js.map