Skip to content

Instantly share code, notes, and snippets.

@Moketronics
Created March 19, 2012 22:51
Show Gist options
  • Save Moketronics/2127902 to your computer and use it in GitHub Desktop.
Save Moketronics/2127902 to your computer and use it in GitHub Desktop.
User database
# 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