Skip to content

Instantly share code, notes, and snippets.

View vekexasia's full-sized avatar

Andrea Baccega vekexasia

View GitHub Profile
@vekexasia
vekexasia / gist:2328838
Created April 7, 2012 13:20
Database schema for a password reset functionality.
CREATE TABLE IF NOT EXISTS `resetpasswordtokens` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userID` int(11) NOT NULL,
`token` char(32) NOT NULL,
`status` set('used','new') NOT NULL DEFAULT 'new',
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `userID` (`userID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;