mirror of
https://github.com/spchcap/speech.capital.git
synced 2026-01-13 16:18:06 +00:00
Fix: Use db.exec for schema creation as batch is unsupported
This commit is contained in:
@@ -61,8 +61,7 @@ export async function onRequestPost({ request, env }) {
|
||||
}
|
||||
|
||||
if (action === 'create') {
|
||||
const stmts = schemaV1.map(sql => db.prepare(sql));
|
||||
const results = await db.batch(stmts);
|
||||
const results = await db.exec(schemaV1.join(''));
|
||||
return Response.json({ success: true, results });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user