Skip to content

Instantly share code, notes, and snippets.

@portableant
Created May 9, 2014 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save portableant/f20685874f7895e8922f to your computer and use it in GitHub Desktop.
Save portableant/f20685874f7895e8922f to your computer and use it in GitHub Desktop.
Redirects for login
CREATE TABLE `loginRedirect` (
'id' int(11) NOT NULL auto_increment,
'uri' text collate utf8_unicode_ci,
'alias' varchar(100) NOT NULL,
'userID' int(11) NOT NULL,
'created' datetime default NULL,
'createdBy' int(11) NOT NULL,
'updated' datetime default NULL,
'updatedBy' int(11) NOT NULL,
PRIMARY KEY ('id'),
KEY 'userID' ('userID'),
)
ENGINE=MyISAM
DEFAULT CHARSET=utf8
COLLATE=utf8_unicode_ci
COMMENT='Redirect to URI on login';
/*
Mary, I've added in 3 other columns to your proposal and removed the auto increment.
a) Added an alias for the URI so that we can do key - pair calls from the model your propose
b) This can be changed: added updated and updatedBy: when the logic is written for the uri to be set
we should either check for the userid and delete and then insert new, or update the existing one.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment