Re: [habari commit] r1114

1 view
Skip to first unread message

Scott Merrill

unread,
Nov 21, 2007, 6:29:35 PM11/21/07
to habar...@googlegroups.com
codesite...@google.com wrote:
> First pass Session handler.

Aside from the session table, where is the session handler? ;)

> +CREATE TABLE {$prefix}sessions (
> + session_id INT UNSIGNED NOT NULL auto_increment,
> + token varchar(255) NOT NULL,
> + subnet INT UNSIGNED NOT NULL DEFAULT 0,
> + expires INT UNSIGNED NOT NULL DEFAULT 0,
> + ua VARCHAR(255) NOT NULL,
> + data MEDIUMTEXT,
> + PRIMARY KEY (session_id),
> + UNIQUE KEY token (token)
> );

Why did you include a session_id column? Is that something we're likely
to need? I think the token should be unique across all sessions, so it
should be the primary key used to select a session from the DB. Using
session IDs doesn't seem to gain us anything.

Also, I think we should store the user's ID as a distinct column in the
table, so that we can quickly fetch the user with User::get_by_id().

--
GPG 9CFA4B35 | ski...@skippy.net | http://skippy.net/

Christian Mohn

unread,
Nov 21, 2007, 6:34:33 PM11/21/07
to habar...@googlegroups.com
svn up -r 1113 saved me ;-)
Reply all
Reply to author
Forward
0 new messages