Fix onboarding schema
This commit is contained in:
parent
92878a6bd9
commit
57d1b070f4
1 changed files with 2 additions and 2 deletions
|
|
@ -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"]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue