26 lines
493 B
SQL
26 lines
493 B
SQL
CREATE TABLE Documents (
|
|
ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
Title TEXT NOT NULL,
|
|
Description TEXT,
|
|
Author TEXT,
|
|
Published TEXT,
|
|
URL TEXT
|
|
);
|
|
|
|
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
|
|
);
|