Created
March 13, 2016 01:12
-
-
Save STashakkori/37c5e164de133d608fc3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create database if not exists sumo; | |
use sumo; | |
create table if not exists users( | |
sid int unsigned not null, | |
pviews int, | |
primary key(sid) | |
); | |
create table if not exists questions( | |
qid int unsigned not null, | |
body text, | |
primary key(qid) | |
); | |
create table if not exists accounts( | |
username varchar(50), | |
password varchar(50), | |
isadmin bool | |
); | |
create table if not exists answers( | |
userssid int unsigned not null, | |
questionsqid int unsigned not null, | |
body text, | |
foreign key(userssid) references users(sid), | |
foreign key(questionsqid) references questions(qid), | |
primary key(userssid, questionsqid) | |
); | |
create table if not exists usercount( | |
counter int | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment