1
0
mirror of https://github.com/Adam-Ant/QuotesDB synced 2024-11-05 10:56:22 +00:00
QuotesDB/default.sql
2017-10-05 00:32:33 +01:00

20 lines
445 B
SQL

CREATE TABLE Users (
uid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
user VARCHAR(255) NOT NULL UNIQUE,
realname VARCHAR(255) NOT NULL,
password VARCHAR(255),
isadmin BIT NOT NULL
);
CREATE TABLE Quotes (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
quote VARCHAR(2048) NOT NULL,
date VARCHAR(255) NOT NULL,
user INT NOT NULL,
context VARCHAR(8000),
addedby INT NOT NULL,
FOREIGN KEY (user) REFERENCES Users(uid)
);