Skip to content

Instantly share code, notes, and snippets.

@craiglabenz
Created November 14, 2013 15:46
Show Gist options
  • Save craiglabenz/7469070 to your computer and use it in GitHub Desktop.
Save craiglabenz/7469070 to your computer and use it in GitHub Desktop.
CREATE TABLE `persons` (
`sid` int(11) NOT NULL,
`is_active_user` tinyint(1) NOT NULL,
`is_premium` tinyint(1) NOT NULL,
`is_staff` tinyint(1) NOT NULL,
`is_superuser` tinyint(1) NOT NULL,
`is_deactivated` tinyint(1) NOT NULL,
`is_merged_out` tinyint(1) NOT NULL,
`password` varchar(128) NOT NULL,
`last_login` datetime DEFAULT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`sid`),
KEY (`is_active_user`),
KEY (`is_premium`),
KEY (`is_deactivated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `persons_core` (
sid PK SEQUENCE
guid UNIQUE KEY mysqls UUID()
created
)
CREATE TABLE `person_usernames` (
sid UNIQUE INDEX
username PRIMARY KEY
created
modified
)
CREATE TABLE `persons_changed_usernames` (
sid INDEX (not unique)
username PK
created
modified
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment