api: add activation fields
Pedro Lucas Porcellis porcellis@eletrotupi.com · 5 months ago
a41d791f910607f9855186176b4ac73901ced70f Browse filesParents
96e7fe0Changed files
2
Additions
+8
Deletions
0
/dev/null → api/prisma/migrations/20260529205724_add_activation_fields/migration.sql
1 +
-- AlterTable
2 +
ALTER TABLE "users" ADD COLUMN "activation_code" TEXT,
3 +
ADD COLUMN "activation_code_expires_at" TIMESTAMP(3),
4 +
ADD COLUMN "active" BOOLEAN NOT NULL DEFAULT false;
api/prisma/schema.prisma
1 1
generator client {
2 2
provider = "prisma-client-js"
3 3
//output = "../src/generated/prisma"
4 4
}
5 5
18 18
createdAt DateTime @default(now()) @map("created_at")
19 19
updatedAt DateTime @updatedAt @map("updated_at")
20 20
avatarKey String? @map("avatar_key")
21 21
avatarURL String? @map("avatar_url")
22 22
23 +
activationCode String? @map("activation_code")
24 +
activationCodeExpiresAt DateTime? @map("activation_code_expires_at")
25 +
active Boolean @default(false) @map("active")
26 +
23 27
moods Mood[]
24 28
interventions Intervention[]
25 29
triggers Trigger[]
26 30
reminders Reminder[]
27 31
sleepRecords SleepRecord[]
146 150
ANXIETY
147 151
GRATITUDE
148 152
FOCUS
149 153
TIREDNESS
150 154
}