Aller au contenu
#0784
Sqlite

The customer's database exists because you wrote to it

A new customer signs up. Your handler writes their welcome record: PUT /kv/welcome?db=cust-8412&create_db_if_missing=true. The database didn't exist when the request started. It exists now: created at /hoody/databases/cust-8412.db and holding its first row, because the row needed somewhere to live.

Compare the ceremony this replaces: open the provider console, create a project, wait for provisioning, copy the connection string, store it in secrets, deploy. Per customer. Here provisioning is a boolean on the first write, and POST /api/v1/sqlite/db/create?init_kv=true exists for the times you want the schema ready before the data arrives. Onboarding code stops orchestrating infrastructure and just writes data.

The database is a side effect of needing one.