pile/db_ddl.sql

27 lines
502 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,
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
);