fix: implement feedback

This commit is contained in:
Mythie
2023-09-14 13:21:03 +10:00
parent 6c12ed4afc
commit 2356f58e7b
9 changed files with 48 additions and 34 deletions

View File

@ -1,5 +1,7 @@
-- AlterTable
ALTER TABLE "Document" ADD COLUMN "createdAt" TIMESTAMP(3);
-- AlterTable
ALTER TABLE "Document" ADD COLUMN "updatedAt" TIMESTAMP(3);
-- DefaultValues
@ -9,5 +11,9 @@ SET
"updatedAt" = COALESCE("created"::TIMESTAMP, NOW());
-- AlterColumn
ALTER TABLE "Document" ALTER COLUMN "createdAt" SET NOT NULL DEFAULT NOW();
ALTER TABLE "Document" ALTER COLUMN "updatedAt" SET NOT NULL DEFAULT NOW();
ALTER TABLE "Document" ALTER COLUMN "createdAt" SET DEFAULT NOW();
ALTER TABLE "Document" ALTER COLUMN "createdAt" SET NOT NULL;
-- AlterColumn
ALTER TABLE "Document" ALTER COLUMN "updatedAt" SET DEFAULT NOW();
ALTER TABLE "Document" ALTER COLUMN "updatedAt" SET NOT NULL;

View File

@ -0,0 +1,8 @@
/*
Warnings:
- You are about to drop the column `created` on the `Document` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "Document" DROP COLUMN "created";