Table of Contents



pears.status

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

Description

Multi-purpose table holding Person, Vacancy and Progress states.

Columns

Column Type Null Default Comment
type char(1) NOT NULL
status char(4) NOT NULL
rejectstatus char(1) NULL
isfixed smallint NULL
name char(40) NOT NULL
final smallint NULL 0
help char(40) NOT NULL
sortorder integer NULL
gridsortorder integer NULL
PublishToWeb smallint NULL 0 1 to show records with this status on web
AllowSetOnWeb smallint NULL 0 1 to allow this status to be set on web
ContactEventClass char(2) NULL
BackgroundColour integer NULL 16777215
FontColour integer NULL 0
IsInterview smallint NULL 0 1 for progress interviews
OverrideFormColour tinyint NULL 0

Primary Key

Foreign Keys

Constraint Columns References Delete/update action
contactclass ContactEventClass pears.contactclass (classcode)

Referenced By

Table Constraint Columns Referenced columns
pears.PersonStatusDivision status Status, Type status, type
pears.ProgressStatusDivision status Status, Type status, type

Indexes

Name Type Columns Detail
status_sortorder Index sortorder

Triggers

Name Timing Event
WPK_status_STATUS after insert,delete,update order 1

Original SQL

-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."status"
-- Table comment: Multi-purpose table holding Person, Vacancy and Progress states.
-- Statement count: 9
 
CREATE TABLE "pears"."status" (
    "type"                           CHAR(1) NOT NULL
   ,"status"                         CHAR(4) NOT NULL
   ,"rejectstatus"                   CHAR(1) NULL
   ,"isfixed"                        SMALLINT NULL
   ,"name"                           CHAR(40) NOT NULL
   ,"final"                          SMALLINT NULL DEFAULT 0
   ,"help"                           CHAR(40) NOT NULL
   ,"sortorder"                      INTEGER NULL
   ,"gridsortorder"                  INTEGER NULL
   ,"PublishToWeb"                   SMALLINT NULL DEFAULT 0
   ,"AllowSetOnWeb"                  SMALLINT NULL DEFAULT 0
   ,"ContactEventClass"              CHAR(2) NULL
   ,"BackgroundColour"               INTEGER NULL DEFAULT 16777215
   ,"FontColour"                     INTEGER NULL DEFAULT 0
   ,"IsInterview"                    SMALLINT NULL DEFAULT 0
   ,"OverrideFormColour"             tinyint NULL DEFAULT 0
   ,PRIMARY KEY ("type" ASC,"status" ASC) 
   ,CONSTRAINT "StatusLengthCheck" CHECK("length"("Status") <= IF "Type" = 'R' THEN 4 ELSE 1 endif)
)
GO
 
 
COMMENT ON COLUMN "pears"."status"."PublishToWeb" IS 
	'1 to show records with this status on web'
GO
 
 
COMMENT ON COLUMN "pears"."status"."AllowSetOnWeb" IS 
	'1 to allow this status to be set on web'
GO
 
 
COMMENT ON COLUMN "pears"."status"."IsInterview" IS 
	'1 for progress interviews'
GO
 
 
COMMENT ON TABLE "pears"."status" IS 
	'Multi-purpose table holding Person, Vacancy and Progress states.'
GO
 
 
ALTER TABLE "pears"."status"
    ADD FOREIGN KEY "contactclass" ("ContactEventClass" ASC)
    REFERENCES "pears"."contactclass" ("classcode")
GO
 
 
CREATE INDEX "status_sortorder" ON "pears"."status"
    ( "sortorder" )
GO
 
 
CREATE TRIGGER "WPK_status_STATUS" after INSERT,DELETE,UPDATE ORDER 1 ON
"pears"."status"
FOR each statement
BEGIN
  CALL "WPKTrackChange"('P','STATUS')
END
GO
 
 
COMMENT TO PRESERVE FORMAT ON TRIGGER "pears"."status"."WPK_status_STATUS" IS 
{CREATE TRIGGER WPK_status_STATUS 
 after INSERT,DELETE,UPDATE ORDER 1 ON
STATUS
FOR each statement
BEGIN
  CALL WPKTrackChange('P','STATUS')
END
}
GO