-- Copyright (C) 2003 Media Net Link, Inc. Danville, CA 94526 USA
-- 
-- This file is part of AthenaRMS.
-- 
-- AthenaRMS is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
-- 
-- AthenaRMS is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
-- 
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

    create table ticket (
      ticket_id int primary key not null,
      user_person_id int references person (person_id),
      crm_id int not null,
      remote_host varchar(255),
      browser varchar(255),
      referring_url varchar(255),
      account_id varchar (255),
      well_presented char(1) default 'N',
      find_info char(1) default 'N',
      use_help char(1) default 'N',
      help_useful char(1) default 'N',
      mass_queue char(1) default 'N',
      additional_info text,
      updated_date timestamp,
      updated_by varchar(255),
      created_date timestamp,
      created_by varchar(255),
      foreign key (crm_id) references company_crm (crm_id),
      foreign key (well_presented) references yes_no (yes_no),
      foreign key (find_info) references yes_no (yes_no),
      foreign key (use_help) references yes_no (yes_no),
      foreign key (help_useful) references yes_no (yes_no),
      foreign key (mass_queue) references yes_no (yes_no)
  );
