Compare commits
1 Commits
feat/admin
...
fix/lifecy
| Author | SHA1 | Date | |
|---|---|---|---|
| af20a4aa57 |
6
apps/api/drizzle/0035_status_changed_by_text.sql
Normal file
6
apps/api/drizzle/0035_status_changed_by_text.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- Süper Panel lifecycle aksiyonları founderId olarak panelin Better Auth
|
||||
-- kullanıcı ID'sini (32 karakter nanoid) gönderiyor; uuid kolonu bunu
|
||||
-- reddedip suspend/ban'ı 500 ile düşürüyordu ("invalid input syntax for
|
||||
-- type uuid"). Alan FK'sız salt audit → text. Mevcut UUID değerleri
|
||||
-- USING ile aynen korunur.
|
||||
ALTER TABLE "users" ALTER COLUMN "status_changed_by" TYPE text USING "status_changed_by"::text;
|
||||
@@ -246,6 +246,13 @@
|
||||
"when": 1784965129879,
|
||||
"tag": "0034_vehicle_fully_fetched",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 35,
|
||||
"version": "7",
|
||||
"when": 1786440823041,
|
||||
"tag": "0035_status_changed_by_text",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -32,7 +32,9 @@ export const users = pgTable(
|
||||
status: varchar("status", { length: 20 }).default("active").notNull(),
|
||||
statusReason: text("status_reason"),
|
||||
statusChangedAt: timestamp("status_changed_at", { withTimezone: true }),
|
||||
statusChangedBy: uuid("status_changed_by"),
|
||||
// Süper Panel founder ID'si (Better Auth nanoid) — sase users.id UUID'si
|
||||
// DEĞİL, o yüzden text. FK yok; salt audit alanı.
|
||||
statusChangedBy: text("status_changed_by"),
|
||||
referralCode: varchar("referral_code", { length: 20 }),
|
||||
referredBy: uuid("referred_by"),
|
||||
// Reward days earned via referrals that couldn't be applied to a live
|
||||
|
||||
Reference in New Issue
Block a user