mirror of
https://github.com/r-ca/kidshift-be.git
synced 2024-10-26 00:24:02 +00:00
codeの型しゅうせい
This commit is contained in:
parent
78dd9244d7
commit
7554ed47ef
|
@ -0,0 +1,12 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "ActiveLoginCode" (
|
||||
"id" TEXT NOT NULL,
|
||||
"child_id" TEXT NOT NULL,
|
||||
"code" TEXT NOT NULL,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "ActiveLoginCode_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ActiveLoginCode" ADD CONSTRAINT "ActiveLoginCode_child_id_fkey" FOREIGN KEY ("child_id") REFERENCES "Child"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Changed the type of `code` on the `ActiveLoginCode` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "ActiveLoginCode" DROP COLUMN "code",
|
||||
ADD COLUMN "code" INTEGER NOT NULL;
|
|
@ -76,7 +76,7 @@ model TaskChildLinkage {
|
|||
model ActiveLoginCode {
|
||||
id String @id @default(cuid())
|
||||
child_id String
|
||||
code String
|
||||
code Int
|
||||
created_at DateTime @default(now())
|
||||
child Child @relation(fields: [child_id], references: [id])
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user