Fix onboarding schema

This commit is contained in:
Manohar Gupta 2026-05-17 00:25:56 +05:30
parent 92878a6bd9
commit 57d1b070f4

View file

@ -25,8 +25,8 @@ export async function POST(request: Request) {
const { familyName, memberName, childName, birthDate, sex } = body; const { familyName, memberName, childName, birthDate, sex } = body;
try { try {
// Check if families table needs tier column // Create family
// Try with just basic columns first const familyId = crypto.randomUUID();
await sql.unsafe( await sql.unsafe(
`INSERT INTO families (id, name, created_at, updated_at) VALUES ($1, $2, NOW(), NOW())`, `INSERT INTO families (id, name, created_at, updated_at) VALUES ($1, $2, NOW(), NOW())`,
[familyId, familyName || "The Family"] [familyId, familyName || "The Family"]