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.
18 lines
384 B
SQL
18 lines
384 B
SQL
DROP TABLE IF EXISTS branches;
|
|
DROP TABLE IF EXISTS trees;
|
|
|
|
CREATE TABLE branches (
|
|
id TEXT PRIMARY KEY NOT NULL,
|
|
parent TEXT NOT NULL,
|
|
content 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
|
|
);
|