You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
418 B
SQL

DROP TABLE IF EXISTS branches;
DROP TABLE IF EXISTS trees;
CREATE TABLE branches (
id INTEGER PRIMARY KEY AUTOINCREMENT,
branch TEXT NOT NULL,
content TEXT NOT NULL,
parent TEXT NOT NULL,
username TEXT,
tree TEXT NOT NULL,
FOREIGN KEY (tree) REFERENCES trees(slug)
);
CREATE TABLE trees (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
slug TEXT NOT NULL UNIQUE
);