
#
#   Axis--User.php
#   SQL Table Creation Code
#
#   Copyright 1999-2001 Axis Data
#   This code is free software that can be used or redistributed under the
#   terms of Version 2 of the GNU General Public License, as published by the
#   Free Software Foundation (http://www.fsf.org).
#
#   Author:  Edward Almasy (almasy@axisdata.com)
#
#   Part of the AxisPHP library v1.2.4
#   For more information see http://www.axisdata.com/AxisPHP/
#


CREATE TABLE IF NOT EXISTS APUsers (
  UserId                INT NOT NULL AUTO_INCREMENT,
  UserName              TEXT NOT NULL,
  UserPassword          TEXT NOT NULL,
  CreationDate          DATETIME,
  LastLoginDate         DATETIME NOT NULL,
  RegistrationConfirmed INT DEFAULT 0,
  EMail                 TEXT,
  WebSite               TEXT,
  RealName              TEXT,
  AddressLineOne        TEXT,
  AddressLineTwo        TEXT,
  City                  TEXT,
  State                 TEXT,
  Country               TEXT,
  ZipCode               TEXT,
  LastLocation          TEXT,
  LastActiveDate        DATETIME,
  LastIPAddress         TEXT,
  INDEX (UserId)
);

CREATE TABLE IF NOT EXISTS APUserPrivileges (
  UserId            INT NOT NULL,
  Privilege         INT NOT NULL,
  INDEX (UserId)
);

