mirror of
https://github.com/Adam-Ant/QuotesDB
synced 2024-11-05 10:56:22 +00:00
19 lines
421 B
SQL
19 lines
421 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),
|
|
FOREIGN KEY (user) REFERENCES Users(uid)
|
|
);
|
|
|
|
|