Though it's perhaps not exactly as I'd prefer, a consensus has formed on where
to put your source and test source code for Java projects. I'm going to toe the line here because I want to use SBT to publish samskivert to the centralized Maven repositories. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2807 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* $Id: create_user_tables.mysql,v 1.3 2001/11/01 01:49:12 mdb Exp $
|
||||
*
|
||||
* Creates the necessary database tables in MySQL for the user repository.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The users table contains a row for every user.
|
||||
*/
|
||||
DROP TABLE IF EXISTS users;
|
||||
CREATE TABLE users (
|
||||
userId INTEGER(10) PRIMARY KEY NOT NULL AUTO_INCREMENT,
|
||||
username VARCHAR(24) NOT NULL,
|
||||
password VARCHAR(13) NOT NULL,
|
||||
email VARCHAR(128) NOT NULL,
|
||||
realname VARCHAR(128) NOT NULL,
|
||||
created DATE NOT NULL,
|
||||
siteId INTEGER(5) NOT NULL,
|
||||
|
||||
UNIQUE INDEX username_index (username)
|
||||
);
|
||||
|
||||
/**
|
||||
* The sessions table contains a row for every authenticated
|
||||
* user. Sessions map a session identifier to a user record and expire
|
||||
* after an application determined amount of time. A request that supplies
|
||||
* a valid session identifier is treated as being authenticated as the
|
||||
* user to which that session is mapped, so long timeouts are discouraged.
|
||||
*/
|
||||
DROP TABLE IF EXISTS sessions;
|
||||
CREATE TABLE sessions (
|
||||
sessionId INTEGER(10) PRIMARY KEY NOT NULL AUTO_INCREMENT,
|
||||
authcode VARCHAR(32) NOT NULL,
|
||||
userId INTEGER(10) NOT NULL,
|
||||
expires DATE NOT NULL,
|
||||
|
||||
UNIQUE INDEX authcode_index (authcode)
|
||||
);
|
||||
Reference in New Issue
Block a user