drift/moor/test/data/tables/test.moor

10 lines
275 B
SQL

CREATE TABLE states (
id INT NOT NULL PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL
);
CREATE TABLE experiments (
id INT NOT NULL PRIMARY KEY AUTOINCREMENT,
description TEXT NOT NULL,
state INT REFERENCES states(id) ON UPDATE CASCADE ON DELETE SET NULL
)