Closed douglasmdev closed 1 year ago
Glauber has raised the following issue:
Given the following table:
CREATE TABLE users ( id text PRIMARY KEY DEFAULT (uuid4()) NOT NULL, updated_at integer DEFAULT CURRENT_TIMESTAMP NOT NULL )
The following trigger statement works on sqlite3, but not on sqld:
CREATE TRIGGER update_updated_at AFTER UPDATE ON users FOR EACH ROW BEGIN UPDATE users SET updated_at = 0 WHERE id = NEW.id; end;
This is hapening because we treat semi-colons as the end of a statement, which is not true for CREATE TRIGGER statements.
CREATE TRIGGER
just FYI, someone hit this again today. the workaround is to not use the shell for that for the time being, and use an SDK instead
Glauber has raised the following issue:
Given the following table:
The following trigger statement works on sqlite3, but not on sqld:
This is hapening because we treat semi-colons as the end of a statement, which is not true for
CREATE TRIGGER
statements.