2017-10-03 01:18:13 +00:00
|
|
|
CREATE TABLE Users (
|
2017-10-03 22:27:51 +00:00
|
|
|
uid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
2017-10-04 00:04:18 +00:00
|
|
|
user VARCHAR(255) NOT NULL UNIQUE,
|
2017-10-03 22:27:51 +00:00
|
|
|
realname VARCHAR(255) NOT NULL,
|
|
|
|
password VARCHAR(255),
|
2017-10-04 00:04:18 +00:00
|
|
|
isadmin BIT NOT NULL
|
2017-10-03 01:18:13 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
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),
|
2017-10-04 23:32:33 +00:00
|
|
|
addedby INT NOT NULL,
|
2017-10-03 01:18:13 +00:00
|
|
|
FOREIGN KEY (user) REFERENCES Users(uid)
|
|
|
|
);
|
|
|
|
|
|
|
|
|