/*
--	$Id: slips.interbase,v 1.7 2000/06/09 04:20:46 billf Exp $
--
--	Table structure for table 'slips'
*/

CREATE TABLE slips (
  sid INTEGER NOT NULL PRIMARY KEY,
  spid INTEGER DEFAULT 0 NOT NULL,
  depend INTEGER,
  o_date INTEGER,
  o_tech VARCHAR(50),
  c_date INTEGER,
  c_tech VARCHAR(10),
  currtech VARCHAR(10),
  status CHAR(1),
  priority INTEGER,
	severity CHAR(1),
  ctag VARCHAR(20),
  problem VARCHAR(80),
  summary blob SUB_TYPE 0 SEGMENT SIZE 80,
  so_date INTEGER,
  sc_date INTEGER,
  grp VARCHAR(10),
  is_public CHAR(1),
  l_activity INTEGER,
  l_tech VARCHAR(50),
  num_children INTEGER,
  num_follows INTEGER,
  timespent INTEGER,
  spolicy INTEGER,
  caddlabel VARCHAR(10),
  cphonelabel VARCHAR(10),
  resource VARCHAR(10)
);

CREATE INDEX SPID_IDX ON SLIPS(SPID);

CREATE GENERATOR SLIPS_GEN;

SET TERM !! ;
CREATE TRIGGER SLIPS_row_trigger FOR SLIPS
ACTIVE BEFORE INSERT POSITION 0
	AS BEGIN
     		NEW.SID = GEN_ID (SLIPS_GEN, 1);
	END !!
COMMIT WORK !!
SET TERM ; !!
