Created
March 19, 2012 22:51
-
-
Save Moketronics/2127902 to your computer and use it in GitHub Desktop.
User database
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
# MySQL User DB Schema | |
CREATE TABLE users( | |
user_id INT(6) NOT NULL AUTO_INCREMENT, | |
e_mail TEXT NOT NULL, | |
first_name TEXT NOT NULL, | |
last_name TEXT NOT NULL, | |
password CHAR(40) NOT NULL, | |
permission TINYINT(1) NOT NULL, | |
date_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | |
PRIMARY KEY (user_id), | |
); | |
# MySQL modifications by user TABLE | |
CREATE TABLE modifications( | |
mod_id INT(9) NOT NULL AUTO_INCREMENT, | |
tile_id INT(6) NOT NULL, | |
user_id INT(6) NOT NULL, | |
mod_target INT(2), | |
old_value TEXT, | |
new_value TEXT, | |
date_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | |
PRIMARY KEY (mod_id) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment