sqlite_schema is unrelated to migrations, it's an internal table SQLite uses for various things.
sqlite_schema is unrelated to migrations, it's an internal table SQLite uses for various things.
uuid.c (https://sqlite.org/src/file/ext/misc/uuid.c) to generate UUIDsconsole tab in the interface but it says I'm not authorized BEGIN... COMMIT; which I guess is not supporteda/ and b/), both with D1 bindings to DB in their wrangler.tomls. I created the D1 inside a/, added some data, and can retrieve it using pnpm wrangler d1 execute DB --local --command="SELECT * FROM users" inside a/. Ideally, I'd like to run the same command in b/, but I'm getting an error: no such table: users. I'm guessing this is because the local D1 instance is inside a/.wrangler/state/v3/d1/miniflare-D1DatabaseObject ...is there any way to make this (or similar) work?mf.options.d1Persist: 'data-worker/.wrangler/state/v3/d1, i.e. the path which contains miniflare-D1DatabaseObject inside the worker where D1 was createddata-worker)prepare("DELETE FROM table WHERE id = ?1").bind(bla).first() does not workRETURNING * to the endIN operator?? in the WHERE clause.

INSERT INTO tokens VALUES('XXX',2024-01-27 08:56:38,2024-01-27 08:56:38,'XXX','XXX','ACCESS',NULL,NULL);wrangler d1 info + wrangler d1 insights?info is reporting 0 read queries in the past 24h (not the case unless it's somehow using some local version? The ID is the same as in my CF dash)insights is returning an empty array regardless of configuration
INSERT INTO company_profile
(symbol, companyName, website, fullTimeEmployees, industry, overallRisk, description)
VALUES (?, ?, ?, ?, ?, ?, ?);
;Preparing to insert/update data for symbol: ${entry.symbol});Data successfully inserted for symbol: ${entry.symbol}, result);Insert failed for symbol: ${entry.symbol}, result);Failed to insert data for symbol: ${entry.symbol}, error);uuid.cconsoleBEGIN... COMMIT;a/a/a/b/b/pnpm wrangler d1 execute DB --local --command="SELECT * FROM users"no such table: usersa/.wrangler/state/v3/d1/miniflare-D1DatabaseObjectmf.options.d1Persist: 'data-worker/.wrangler/state/v3/d1miniflare-D1DatabaseObjectdata-workerprepare("DELETE FROM table WHERE id = ?1").bind(bla).first()RETURNING *export const {
handlers: { GET, POST },
auth,
signIn,
signOut,
} = NextAuth({
adapter: DrizzleAdapter(getDBInstance()),
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID ?? "",
clientSecret: process.env.GOOGLE_CLIENT_SECRET ?? "",
}),
],
});export const getDBInstance = () => {
console.log("getRequestContext", getRequestContext);
const DB = getRequestContext().env.AI_FORM_GENERATOR_DB;
return drizzle(DB, { schema });
};INconst userIds = [1, 2, 3]
const sqlQuery= env.DB.prepare(
`
SELECT * FROM Users
WHERE user_id in (?)`
).bind(userIds);
const { results } = await sqlQuery.all();INSERT INTO tokens VALUES('XXX',2024-01-27 08:56:38,2024-01-27 08:56:38,'XXX','XXX','ACCESS',NULL,NULL);wrangler d1 infowrangler d1 insightsinfoinsights
INSERT INTO company_profile
(symbol, companyName, website, fullTimeEmployees, industry, overallRisk, description)
VALUES (?, ?, ?, ?, ?, ?, ?);
Preparing to insert/update data for symbol: ${entry.symbol}Data successfully inserted for symbol: ${entry.symbol}Insert failed for symbol: ${entry.symbol}Failed to insert data for symbol: ${entry.symbol}