database:tables:pears_chatmessage



pears.ChatMessage

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

Links to staff

Column Type Null Default Comment
ChatID char(20) NOT NULL
ChatDate timestamp NOT NULL
WhoID char(20) NOT NULL
WhoType char(1) NOT NULL N=IQXUser S=IQX Consultant
ChatMessage char(255) NULL
  • ChatID, ChatDate, WhoID, WhoType
Constraint Columns References Delete/update action
Chat ChatID pears.Chat (ChatID) NOT NULL; ON DELETE CASCADE
  • No incoming foreign keys found.
  • No indexes found.
  • No triggers found.
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."ChatMessage"
-- Table comment: Links to staff
-- Statement count: 4
 
CREATE TABLE "pears"."ChatMessage" (
    "ChatID"                         CHAR(20) NOT NULL
   ,"ChatDate"                       TIMESTAMP NOT NULL
   ,"WhoID"                          CHAR(20) NOT NULL
   ,"WhoType"                        CHAR(1) NOT NULL
   ,"ChatMessage"                    CHAR(255) NULL
   ,PRIMARY KEY ("ChatID" ASC,"ChatDate" ASC,"WhoID" ASC,"WhoType" ASC) 
)
GO
 
 
COMMENT ON COLUMN "pears"."ChatMessage"."WhoType" IS 
	'N=IQXUser S=IQX Consultant'
GO
 
 
COMMENT ON TABLE "pears"."ChatMessage" IS 
	'Links to staff'
GO
 
 
ALTER TABLE "pears"."ChatMessage"
    ADD NOT NULL FOREIGN KEY "Chat" ("ChatID" ASC)
    REFERENCES "pears"."Chat" ("ChatID")
    ON DELETE CASCADE
GO
  • database/tables/pears_chatmessage.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1