Skip to content

Instantly share code, notes, and snippets.

@MichaelObi
Last active December 21, 2015 05:28
Show Gist options
  • Save MichaelObi/6256766 to your computer and use it in GitHub Desktop.
Save MichaelObi/6256766 to your computer and use it in GitHub Desktop.
Code to create table for users in GCM tutorial - CodeIndulge
CREATE TABLE IF NOT EXISTS `users` (
`user_id` int(5) NOT NULL AUTO_INCREMENT,
`gcm_id` text NOT NULL,
`email` varchar(40) NOT NULL,
`phone` varchar(15) NOT NULL,
`password` varchar(40) NOT NULL,
`fname` varchar(20) NOT NULL,
`lname` varchar(20) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`user_id`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment