· 8 years ago · May 19, 2018, 01:06 PM
1CREATE TABLE IF NOT EXISTS `accounts` (
2 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
3 `username` varchar(20) NOT NULL,
4 `password_hash` varchar(40) NOT NULL,
5 `salt` varchar(7) NOT NULL,
6 `last_login` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
7 `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
8 PRIMARY KEY (`id`),
9 UNIQUE KEY `email` (`email`)
10) ENGINE=MyISAM DEFAULT CHARSET=utf8;