USER - Web User Table

CREATE TABLE K3S_5WEB.USER ( 
	"user_id" FOR COLUMN UID INTEGER GENERATED ALWAYS AS IDENTITY ( 
	START WITH 1 INCREMENT BY 1 
	NO MINVALUE NO MAXVALUE 
	NO CYCLE NO ORDER 
	CACHE 20 ) , 
	"username" FOR COLUMN UNAME      VARCHAR(255) CCSID 37 DEFAULT NULL , 
	"email" FOR COLUMN EMAIL00001 VARCHAR(255) CCSID 37 DEFAULT NULL , 
	"display_name" FOR COLUMN DNAME      VARCHAR(50) CCSID 37 DEFAULT NULL , 
	"password" FOR COLUMN PASSW00001 VARCHAR(128) CCSID 37 NOT NULL , 
	"state" FOR COLUMN STATE00001 SMALLINT DEFAULT NULL , 
	ROLE VARCHAR(10) ALLOCATE(5) CCSID 37 DEFAULT 'buyer' , 
	ITEMSPERPAGE FOR COLUMN ITEMS00001 CHAR(2) CCSID 37 DEFAULT '10' , 
	PAGERANGE CHAR(2) CCSID 37 DEFAULT '5' , 
	CURFORMAT CHAR(3) CCSID 37 NOT NULL DEFAULT 'USA' , 
	LANG VARCHAR(3) ALLOCATE(3) CCSID 37 NOT NULL DEFAULT 'eng' , 
	REPUSER CHAR(10) CCSID 37 DEFAULT NULL , 
	"k3s" FOR COLUMN K3S__00001 CHAR(1) CCSID 37 DEFAULT '0' , 
	UNDERLINE SMALLINT NOT NULL DEFAULT 1 , 
	CLICKLINE SMALLINT NOT NULL DEFAULT 0 , 
	PASSWORDRESETTIMESTAMP FOR COLUMN PASSW00002 TIMESTAMP DEFAULT NULL , 
	PASSWORDRESETTOKEN FOR COLUMN PASSW00003 VARCHAR(20) ALLOCATE(1) CCSID 37 	DEFAULT '0' , 
	UNIT1 SMALLINT DEFAULT 0 , 
	UNIT2 SMALLINT DEFAULT 0 , 
	UNIT3 SMALLINT DEFAULT 0 , 
	UNIT4 SMALLINT DEFAULT 0 , 
	PROBATION SMALLINT DEFAULT 0 , 
	SERVICECHECK FOR COLUMN SERVI00001 SMALLINT DEFAULT 0 , 
	ORDERPOINT SMALLINT DEFAULT 0 , 
	BACKORDER SMALLINT DEFAULT 0 , 
	NOFILDFT SMALLINT DEFAULT 0 ,
	USERA01 varchar(1),
    	USERA02 varchar(1),
    	USERA03 varchar(1),
    	USERA04 varchar(10),
    	USERA05 varchar(10),
    	USERA06 varchar(10),
    	USERA07 varchar(100),
    	USERA08 varchar(100),
    	USERA09 varchar(100),
    	PASSDATE varchar(10),
	ELEMENTS varchar(1) CCSID 37 DEFAULT 'A')   
	RCDFMT "USER" ; 
  
ALTER TABLE WEB_5WEB.USER 
	ADD CONSTRAINT WEB_5WEB.Q_K3S_5ZEND_USER_UNAME_00001 
	UNIQUE( "username" ) ; 
  
ALTER TABLE WEB_5WEB.USER 
	ADD CONSTRAINT WEB_5WEB.Q_K3S_5ZEND_USER_EMAIL00001_00001 
	UNIQUE( "email" ) ; 
  
LABEL ON TABLE WEB_5WEB.USER 
	IS 'Web - K3S Staff using R6' ;