I would have a database per customer but creating a D1 on the fly seems awful as does applying migra
I would have a database per customer but creating a D1 on the fly seems awful as does applying migrations to all of them
env.DB.prepare(...) is just an object, it has almost nothing to do with SQLite. It is sent to your database, which makes a prepared statement with the SQL text and binds it with your parameters.prepare both times, of course)
env.DB.prepare(...)prepare