CREATE TABLE dbo.QW_EMPLOYEE (
	[qw_employeeid] [int] NOT NULL ,
	[qw_userid] [int] NULL ,
	[qw_employeenum] [varchar] (100) NULL ,
	[qw_orgid] [int] NULL ,
	[qw_managerid] [int] NULL ,
	[qw_firstname] [varchar] (100) NOT NULL ,
	[qw_lastname] [varchar] (100) NOT NULL ,
	[qw_fullname] [varchar] (255) NULL ,
	[qw_soundex] [varchar] (4) NULL ,
	[qw_title] [varchar] (40) NULL ,
	[qw_department] [varchar] (100) NULL ,
	[qw_building] [varchar] (100) NULL ,
	[qw_site] [varchar] (100) NULL ,
	[qw_location] [varchar] (100) NULL ,
	[qw_mailstop] [varchar] (100) NULL ,
	[qw_phone] [varchar] (30) NULL ,
	[qw_altphone] [varchar] (30) NULL ,
	[qw_email] [varchar] (255) NULL ,
	[qw_fax] [varchar] (30) NULL ,
	[qw_pager] [varchar] (30) NULL ,
	[qw_webpage] [varchar] (255) NULL ,
	[qw_reachby] [int] NULL ,
	[qw_notes] [text] NULL ,
	CONSTRAINT [pk_qw_employee] PRIMARY KEY CLUSTERED ([qw_employeeid]) WITH FILLFACTOR = 80 ON [PRIMARY],
	CONSTRAINT [fk_qw_employee_users] FOREIGN KEY ([qw_userid]) REFERENCES QX_USERS ([pkey])
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

INSERT INTO QW_EMPLOYEE (qw_employeeid,qw_userid,qw_firstname,qw_lastname,qw_fullname) VALUES (0,0,'Administrator','Admin','Admin, Administrator');

-- all new update scripts must include a line like this:
UPDATE QX_SYS_PROP SET PROP_VAL = '005' WHERE (PROP_ID = 'DB_APP_VERSION');
