mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
make signed up at default to now (#1284)
This commit is contained in:
parent
238ed06120
commit
736c1a19b1
@ -0,0 +1,8 @@
|
||||
-- Backward-compat: old code that doesn't know about `signedUpAt` omits it from
|
||||
-- INSERT. Adding a DEFAULT lets Postgres fill it automatically.
|
||||
--
|
||||
-- CURRENT_TIMESTAMP is correct here: `createdAt` also defaults to
|
||||
-- CURRENT_TIMESTAMP, so within the same transaction both columns receive the
|
||||
-- same value. Old code never computes risk scores, so the negligible edge
|
||||
-- case of an explicitly-backdated `createdAt` is harmless.
|
||||
ALTER TABLE "ProjectUser" ALTER COLUMN "signedUpAt" SET DEFAULT CURRENT_TIMESTAMP;
|
||||
@ -276,7 +276,7 @@ model ProjectUser {
|
||||
restrictedByAdminPrivateDetails String? // Private details (server access only)
|
||||
|
||||
// Sign-up metadata
|
||||
signedUpAt DateTime
|
||||
signedUpAt DateTime @default(now())
|
||||
signUpIp String?
|
||||
signUpIpTrusted Boolean?
|
||||
signUpEmailNormalized String?
|
||||
|
||||
Loading…
Reference in New Issue
Block a user