Skip to content

Instantly share code, notes, and snippets.

@jerry-maheswara-github
Created February 10, 2018 22:40
Show Gist options
  • Save jerry-maheswara-github/f0cff72131857d8c1733da1e42cbcd2e to your computer and use it in GitHub Desktop.
Save jerry-maheswara-github/f0cff72131857d8c1733da1e42cbcd2e to your computer and use it in GitHub Desktop.
CREATE TABLE `ci_session` (
`id` varchar(40) NOT NULL,
`user_id` int(11) DEFAULT NULL,
`ip_address` varchar(45) NOT NULL,
`timestamp` int(10) unsigned NOT NULL DEFAULT '0',
`data` blob NOT NULL,
PRIMARY KEY (`id`),
KEY `ci_sessions_timestamp` (`timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `user` (
`user_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_email` varchar(255) DEFAULT NULL,
`user_password` varchar(255) DEFAULT NULL,
`user_verification_code` varchar(255) DEFAULT NULL,
`user_level` enum('1','2','3','4','5','6') DEFAULT '1',
`user_name_first` varchar(255) DEFAULT NULL,
`user_name_last` varchar(255) DEFAULT NULL,
`user_birthdate` date DEFAULT NULL,
`user_gender` enum('1','2','3') DEFAULT NULL,
`user_phone` varchar(255) DEFAULT NULL,
`kelurahan_id` int(11) DEFAULT NULL,
`user_avatar` varchar(255) DEFAULT NULL,
`user_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`user_updated` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`user_disabled` tinyint(1) DEFAULT '0',
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment