pears.ProgressHistory

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

History of progress items with dates that the progres state changed.

Column Type Null Default Comment
ProgressHistoryID char(20) NOT NULL
ProgressID char(20) NOT NULL
Status char(4) NOT NULL
HistoryDate date NOT NULL
HistoryTime time NOT NULL
StaffID char(20) NULL
InterviewDate date NULL
InterviewTime time NULL
Note long varchar NULL
WhenEntered timestamp NULL
  • ProgressHistoryID
Constraint Columns References Delete/update action
Progress ProgressID pears.progress (progressid) NOT NULL; ON DELETE CASCADE
Staff StaffID pears.staff (staffid)
  • No incoming foreign keys found.
Name Type Columns Detail
ProgressHistory_WhenEnteredStatus Index WhenEntered, Status
  • No triggers found.
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."ProgressHistory"
-- Table comment: History of progress items with dates that the progres state changed.
-- Statement count: 5
 
CREATE TABLE "pears"."ProgressHistory" (
    "ProgressHistoryID"              CHAR(20) NOT NULL
   ,"ProgressID"                     CHAR(20) NOT NULL
   ,"Status"                         CHAR(4) NOT NULL
   ,"HistoryDate"                    DATE NOT NULL
   ,"HistoryTime"                    TIME NOT NULL
   ,"StaffID"                        CHAR(20) NULL
   ,"InterviewDate"                  DATE NULL
   ,"InterviewTime"                  TIME NULL
   ,"Note"                           long VARCHAR NULL
   ,"WhenEntered"                    TIMESTAMP NULL COMPUTE ("HistoryDate"+"HistoryTime")
   ,PRIMARY KEY ("ProgressHistoryID" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."ProgressHistory" IS 
	'History of progress items with dates that the progres state changed.'
GO
 
 
ALTER TABLE "pears"."ProgressHistory"
    ADD NOT NULL FOREIGN KEY "Progress" ("ProgressID" ASC)
    REFERENCES "pears"."progress" ("progressid")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."ProgressHistory"
    ADD FOREIGN KEY "Staff" ("StaffID" ASC)
    REFERENCES "pears"."staff" ("staffid")
GO
 
 
CREATE INDEX "ProgressHistory_WhenEnteredStatus" ON "pears"."ProgressHistory"
    ( "WhenEntered","Status" )
GO
  • database/tables/pears_progresshistory.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1