refactor(db): fix typos in column names

This commit is contained in:
smyalygames 2023-02-11 18:17:23 +00:00
parent 39da42541f
commit 6e802f8dcd
3 changed files with 22 additions and 2 deletions

View File

@ -0,0 +1,5 @@
-- AlterTable
ALTER TABLE "Restrict" ADD COLUMN "endModId" TEXT;
-- AddForeignKey
ALTER TABLE "Restrict" ADD CONSTRAINT "Restrict_endModId_fkey" FOREIGN KEY ("endModId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;

View File

@ -0,0 +1,15 @@
/*
Warnings:
- You are about to drop the column `endedTime` on the `Restrict` table. All the data in the column will be lost.
- You are about to drop the column `endedTime` on the `TempBan` table. All the data in the column will be lost.
- Added the required column `endTime` to the `TempBan` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Restrict" DROP COLUMN "endedTime",
ADD COLUMN "endTime" TIMESTAMP(3);
-- AlterTable
ALTER TABLE "TempBan" DROP COLUMN "endedTime",
ADD COLUMN "endTime" TIMESTAMP(3) NOT NULL;

View File

@ -100,7 +100,7 @@ model Restrict {
startTime DateTime @default(now())
endMod User? @relation("endRestMod", fields: [endModId], references: [id])
endModId String?
endedTime DateTime?
endTime DateTime?
reason String
}
@ -125,7 +125,7 @@ model TempBan {
mod User @relation("tbanMod", fields: [modId], references: [id])
modId String
startTime DateTime @default(now())
endedTime DateTime
endTime DateTime
active Boolean @default(true)
reason String
}