mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-07-24 23:34:28 +08:00
chore: add created_at to users table
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "users" ADD COLUMN "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "users_created_at_idx" ON "users"("created_at");
|
@ -132,7 +132,9 @@ model User {
|
||||
subscriptions Subscription[]
|
||||
// The stripe customer id corresponds to this user
|
||||
stripeId String? @unique @map("stripe_id")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@index([createdAt], map: "users_created_at_idx")
|
||||
@@map("users")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user