pile/db_versions/0_initial.sql

27 lines
493 B
MySQL
Raw Normal View History

CREATE TABLE Documents (
ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
Title TEXT NOT NULL,
Description TEXT,
Author TEXT,
Published TEXT,
2018-07-31 15:45:54 +02:00
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
);