Skip to content

Instantly share code, notes, and snippets.

@streetcoder
Last active January 9, 2017 10:58
Show Gist options
  • Save streetcoder/8b37a8c5a08cb0e5cf18e64d0d38289c to your computer and use it in GitHub Desktop.
Save streetcoder/8b37a8c5a08cb0e5cf18e64d0d38289c to your computer and use it in GitHub Desktop.
create ddl
CREATE TABLE table_name (
id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT "Primary Key",
session_id VARCHAR(255) NOT NULL COMMENT "php session id",
ip_address VARCHAR(100) NOT NULL COMMENT "IP Address of user",
uid INT(10) UNSIGNED DEFAULT 0 NOT NULL COMMENT "User ID where id=0 is anonymous",
nid INT(10) UNSIGNED NOT NULL COMMENT "Articl/node ID",
emo ENUM('a','b','c','d','e') NOT NULL COMMENT "emotions: a=grin, b=smile, c=sad, d=straight-face, e=love",
created DATETIME DEFAULT CURRENT_TIMESTAMP,
updated DATETIME,
PRIMARY KEY (id)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment