Ideally it'd be great to have either a duplicate or a way to lock a version too keep it "forever".
Ideally it'd be great to have either a duplicate or a way to lock a version too keep it "forever".
--clone/--fork --clone=new-nameNow, you clone it out for initial data. You run things for a while and then you want to revert. Now you have to go and change where each of those things point to (by cloning the "backup" to a separate thing, because otherwise you loose it).
id (in line with kv format), but then the example uses database_id. Which one is it?
database_id id SERIAL PRIMARY KEY seems not work, I follow the doc https://developers.cloudflare.com/workers/tutorials/postgres/#5-interact-with-the-products-database, I know the condition is own host PostgreSQL but the D1 should be the same, right?

id int primary key autoincrementPRIMARY KEY need to be the last "field", so after createdAtD1_ERROR: Error: ERROR 9007: SQL execute error: UNIQUE constraint failed: User.emailD1_ERROR: Error so that I can't detect existed email ERROR 9015: SQL engine error: query error: Error code 2067: A UNIQUE constraint failed (UNIQUE constraint failed: User.email)error.cause?.message CREATE TABLE Love(
uid integer NOT NULL,
ideaId integer NOT NULL,
PRIMARY KEY (uid, ideaId),
createdAt datetime DEFAULT CURRENT_TIMESTAMP
);ERROR 9009: SQL prepare error: near "createdAt": syntax error in CREATE TABLE Love( uid integer NOT NULL, ideaId integer NOT NULL, PRIMARY KEY (uid, ideaId), createdAt datetime DEFAULT CURRENT_TIMESTAMP ); at offset 109