pile/db_ddl.sql
2018-07-31 10:37:54 +02:00

26 lines
502 B
SQL

CREATE TABLE Documents (
ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
Title TEXT NOT NULL,
Description TEXT,
Author TEXT,
Published TEXT,
URL TEXT NOT NULL
);
CREATE TABLE DocumentsToTags (
Document INTEGER NOT NULL,
Tag INTEGER NOT NULL
);
CREATE TABLE Tags (
ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
Name TEXT NOT NULL,
Description TEXT,
Parent INTEGER
);
CREATE TABLE Users (
ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
Username TEXT NOT NULL,
Password TEXT NOT NULL
);