Table of Contents



pears.IQXNetMessageCompanyRecipient

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

Description

Contact who receives a particular type of message from IQXWeb

Columns

Column Type Null Default Comment
RecipientID char(20) NOT NULL
CompanyID char(20) NOT NULL
StaffID char(20) NOT NULL
MessageType char(20) NULL null for all message types

Primary Key

Foreign Keys

Constraint Columns References Delete/update action
Company CompanyID pears.Company (companyid) NOT NULL; ON DELETE CASCADE
Staff StaffID pears.staff (staffid) NOT NULL; ON DELETE CASCADE

Referenced By

Indexes

Triggers

Original SQL

-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."IQXNetMessageCompanyRecipient"
-- Table comment: Contact who receives a particular type of message from IQXWeb
-- Statement count: 5
 
CREATE TABLE "pears"."IQXNetMessageCompanyRecipient" (
    "RecipientID"                    CHAR(20) NOT NULL
   ,"CompanyID"                      CHAR(20) NOT NULL
   ,"StaffID"                        CHAR(20) NOT NULL
   ,"MessageType"                    CHAR(20) NULL
   ,PRIMARY KEY ("RecipientID" ASC) 
)
GO
 
 
COMMENT ON COLUMN "pears"."IQXNetMessageCompanyRecipient"."MessageType" IS 
	'null for all message types'
GO
 
 
COMMENT ON TABLE "pears"."IQXNetMessageCompanyRecipient" IS 
	'Contact who receives a particular type of message from IQXWeb'
GO
 
 
ALTER TABLE "pears"."IQXNetMessageCompanyRecipient"
    ADD NOT NULL FOREIGN KEY "Company" ("CompanyID" ASC)
    REFERENCES "pears"."Company" ("companyid")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."IQXNetMessageCompanyRecipient"
    ADD NOT NULL FOREIGN KEY "Staff" ("StaffID" ASC)
    REFERENCES "pears"."staff" ("staffid")
    ON DELETE CASCADE
GO