The "lock" action is very intuitive given it's common for many things, but this would be great regar
The "lock" action is very intuitive given it's common for many things, but this would be great regardless.
Now, 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 iddatabase_iddatabase_id id SERIAL PRIMARY KEYid int primary key autoincrementERROR 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 109PRIMARY KEYD1_ERROR: Error: ERROR 9007: SQL execute error: UNIQUE constraint failed: User.emailD1_ERROR: ErrorERROR 9015: SQL engine error: query error: Error code 2067: A UNIQUE constraint failed (UNIQUE constraint failed: User.email)error.cause?.messageCREATE TABLE Love(
uid integer NOT NULL,
ideaId integer NOT NULL,
PRIMARY KEY (uid, ideaId),
createdAt datetime DEFAULT CURRENT_TIMESTAMP
);