pears.ProgressHistory
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Description
History of progress items with dates that the progres state changed.
Columns
| 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 |
Primary Key
- ProgressHistoryID
Foreign Keys
| Constraint | Columns | References | Delete/update action |
|---|---|---|---|
| Progress | ProgressID | pears.progress (progressid) | NOT NULL; ON DELETE CASCADE |
| Staff | StaffID | pears.staff (staffid) |
Referenced By
- No incoming foreign keys found.
Indexes
| Name | Type | Columns | Detail |
|---|---|---|---|
| ProgressHistory_WhenEnteredStatus | Index | WhenEntered, Status |
Triggers
- No triggers found.
Original SQL
-- 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