It sounds like you’re using the original alpha backend - that error is very specific to it.
It sounds like you’re using the original alpha backend - that error is very specific to it.
-- Create a table. And an external content fts5 table to index it.
CREATE TABLE tbl(a INTEGER PRIMARY KEY, b, c);
CREATE VIRTUAL TABLE fts_idx USING fts5(b, c, content='tbl', content_rowid='a');
-- Triggers to keep the FTS index up to date.
CREATE TRIGGER tbl_ai AFTER INSERT ON tbl BEGIN
INSERT INTO fts_idx(rowid, b, c) VALUES (new.a, new.b, new.c);
END;
CREATE TRIGGER tbl_ad AFTER DELETE ON tbl BEGIN
INSERT INTO fts_idx(fts_idx, rowid, b, c) VALUES('delete', old.a, old.b, old.c);
END;
CREATE TRIGGER tbl_au AFTER UPDATE ON tbl BEGIN
INSERT INTO fts_idx(fts_idx, rowid, b, c) VALUES('delete', old.a, old.b, old.c);
INSERT INTO fts_idx(rowid, b, c) VALUES (new.a, new.b, new.c);
END;
"@cloudflare/workers-types": "^4.20230710.1"first return Record<string, T> but not T? 4.20230518.0:DROP TABLE IF EXISTS [table001] statement, and wrangler returns an error no such table: main.[table001]?
main.table_name. Just table_name.
DROP TABLE IF EXISTS runs fine in DBeaver, but not wrangler@3.20
wrangler d1 execute report this.
--command='PRAGMA table_list'wrangler d1 execute <db> --command='PRAGMA table_list' --local--local is local. If you don't pass --local, and run wrangler d1 execute [...]
-- Create a table. And an external content fts5 table to index it.
CREATE TABLE tbl(a INTEGER PRIMARY KEY, b, c);
CREATE VIRTUAL TABLE fts_idx USING fts5(b, c, content='tbl', content_rowid='a');
-- Triggers to keep the FTS index up to date.
CREATE TRIGGER tbl_ai AFTER INSERT ON tbl BEGIN
INSERT INTO fts_idx(rowid, b, c) VALUES (new.a, new.b, new.c);
END;
CREATE TRIGGER tbl_ad AFTER DELETE ON tbl BEGIN
INSERT INTO fts_idx(fts_idx, rowid, b, c) VALUES('delete', old.a, old.b, old.c);
END;
CREATE TRIGGER tbl_au AFTER UPDATE ON tbl BEGIN
INSERT INTO fts_idx(fts_idx, rowid, b, c) VALUES('delete', old.a, old.b, old.c);
INSERT INTO fts_idx(rowid, b, c) VALUES (new.a, new.b, new.c);
END;
"@cloudflare/workers-types": "^4.20230710.1"firstRecord<string, T>T4.20230518.0DROP TABLE IF EXISTS [table001]no such table: main.[table001]?main.table_nametable_nameDROP TABLE IF EXISTSwrangler d1 execute--command='PRAGMA table_list'wrangler d1 execute <db> --command='PRAGMA table_list' --localwrangler d1 execute [...]declare abstract class D1PreparedStatement {
bind(...values: any[]): D1PreparedStatement;
first<T = unknown>(colName: string): Promise<T | null>;
first<T = unknown>(): Promise<Record<string, T> | null>;
run<T = unknown>(): Promise<D1Result<T>>;
all<T = unknown>(): Promise<D1Result<T[]>>;
raw<T = unknown>(): Promise<T[]>;
}declare abstract class D1PreparedStatement {
bind(...values: any[]): D1PreparedStatement;
first<T = unknown>(colName?: string): Promise<T>;
run<T = unknown>(): Promise<D1Result<T>>;
all<T = unknown>(): Promise<D1Result<T>>;
raw<T = unknown>(): Promise<T[]>;
}