Which would be 50,000 dbs only. Is there a plan to increase this limit?
Which would be 50,000 dbs only. Is there a plan to increase this limit?
CREATE TABLE query: https://developers.cloudflare.com/api/operations/cloudflare-d1-query-database
Customers table, as you can see with the wrangler query, there is data locally
createdAt DATETIME NOT NULL DEFAULT (CURRENT_TIMESTAMP),-- Migration number: 0000 2024-01-29T06:07:39.777Z
CREATE TABLE searchLogs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
createdAt DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
ip TEXT,
type TEXT NOT NULL CHECK (type IN ('BLID', 'NAME')),
query TEXT NOT NULL
);async function logSearch(DB: D1Database, ip: string, type: string, search: string) {
try {
const logSearchQuery = /*sql*/ `INSERT INTO searchLogs(ip, type, query) VALUES(?, ?, ?)`;
await DB.prepare(logSearchQuery).bind(ip, type.toUpperCase(), search).run();
} catch (error) {
console.error("Failed to log search:", error);
}
}✘ [ERROR] Failed to log search: Error: D1_ERROR: NOT NULL constraint failed: searchLogs.createdAt
[1]
[1] at D1Database._sendOrThrow (cloudflare-internal:d1-api:66:19)
[1] at async D1PreparedStatement.run (cloudflare-internal:d1-api:172:29)-- Migration number: 0001 2024-02-04T19:30:58.384Z
CREATE TABLE IF NOT EXISTS handles (
id INTEGER PRIMARY KEY AUTOINCREMENT,
createdAt DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
auth TEXT NOT NULL,
blid INTEGER NOT NULL,
handle TEXT NOT NULL,
lastSeen DATETIME,
notes TEXT,
UNIQUE(blid, handle)
);
INSERT INTO handles (auth, blid, handle, lastSeen) VALUES ('AAAAA', 0, 'Badspot', datetime('now', '-10 days'));
INSERT INTO handles (auth, blid, handle, lastSeen) VALUES ('ABCDE', 130, 'Space Guy', datetime('now', '-5 days'));
INSERT INTO handles (auth, blid, handle, lastSeen) VALUES ('ABCDE', 130, 'Other Guy', datetime('now', '-3 days'));
INSERT INTO handles (auth, blid, handle, lastSeen) VALUES ('ABCDE', 239, 'Lalam', datetime('now', '-7 days')); createdAt: integer("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),CREATE TABLE createdAt: integer("created_at", { mode: "timestamp" })
.notNull()
.default(sql`(unixepoch())`),