Should a migration file contain only the new changes or contain the db whole definition?
Should a migration file contain only the new changes or contain the db whole definition?
json_object query that requires the higher limitAny particular reason why D1 has settled on a limit of 32?https://www.sqlite.org/security.html has 8, someone made a GitHub issue asking for more, we increased it - we'd appreciate a github issue if you'd like more: https://github.com/cloudflare/workerd/issues
@id @default(uuid()). Do I need to add an explicit index for each id column? The docs say that they are added automatically, but only for INTEGER PRIMARY KEYS. Prisma generates TEXT NOT NULL PRIMARY KEY id columns. SELECT name, type, sql FROM sqlite_schema WHERE type IN ('index'); shows one sqlite autoindex for each table, for example sqlite_autoindex_Organization_1. Is that sufficient or will explicit id indices help with querying?
.meta.duration or how long it takes to get a response?
npx wrangler d1 info if you're not sure which version you're on (it'll tell you if it's alpha)
json_object@id @default(uuid())INTEGER PRIMARY KEYSTEXT NOT NULL PRIMARY KEYSELECT name, type, sql FROM sqlite_schema WHERE type IN ('index');sqlite_autoindex_Organization_1.meta.durationapp.get("/status", async (c) => {
await getDatabaseClient(c.env).select().from(schema.variables).limit(1);
return c.text("OK");
});Error: D1_ERROR: Error 9000: something went wrongnpx wrangler d1 infoselect json_array("id", "location_type", "name", "status", "brand_id", "address", "google_maps_url" /* , ... */)
from location;