open-notebook/migrations/5.surrealql
2024-11-18 22:01:11 -03:00

11 lines
628 B
Text

DEFINE TABLE IF NOT EXISTS transformation SCHEMAFULL;
DEFINE FIELD IF NOT EXISTS name ON TABLE transformation TYPE string;
DEFINE FIELD IF NOT EXISTS title ON TABLE transformation TYPE string;
DEFINE FIELD IF NOT EXISTS description ON TABLE transformation TYPE string;
DEFINE FIELD IF NOT EXISTS prompt ON TABLE transformation TYPE string;
DEFINE FIELD IF NOT EXISTS apply_default ON TABLE transformation TYPE bool DEFAULT False;
DEFINE FIELD IF NOT EXISTS created ON transformation DEFAULT time::now() VALUE $before OR time::now();
DEFINE FIELD IF NOT EXISTS updated ON transformation DEFAULT time::now() VALUE time::now();