====== pears.mailmerge ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Pointers to OLE documents in Blobstore (class M) which are individual users own Word mail merge templates.
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **mailmergeid** | char(20) | NOT NULL | | |
| name | char(50) | NULL | | |
| staffid | char(20) | NULL | | |
| agencyid | char(20) | NULL | | |
| FormFields | tinyint | NULL | 0 | Uses form fields, not document variables |
===== Primary Key =====
* mailmergeid
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| staff | staffid | [[database:tables:pears_staff|pears.staff (staffid)]] | ON DELETE SET NULL |
| agencydetails | agencyid | [[database:tables:pears_agencydetails|pears.agencydetails (agencyid)]] | ON DELETE SET NULL |
===== Referenced By =====
* No incoming foreign keys found.
===== Indexes =====
* No indexes found.
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."mailmerge"
-- Table comment: Pointers to OLE documents in Blobstore (class M) which are individual users own Word mail merge templates.
-- Statement count: 5
CREATE TABLE "pears"."mailmerge" (
"mailmergeid" char(20) NOT NULL
,"name" char(50) NULL
,"staffid" char(20) NULL
,"agencyid" char(20) NULL
,"FormFields" tinyint NULL DEFAULT 0
,PRIMARY KEY ("mailmergeid" ASC)
)
go
COMMENT ON COLUMN "pears"."mailmerge"."FormFields" IS
'Uses form fields, not document variables'
go
COMMENT ON TABLE "pears"."mailmerge" IS
'Pointers to OLE documents in Blobstore (class M) which are individual users own Word mail merge templates.'
go
ALTER TABLE "pears"."mailmerge"
ADD FOREIGN KEY "staff" ("staffid" ASC)
REFERENCES "pears"."staff" ("staffid")
ON DELETE SET NULL
go
ALTER TABLE "pears"."mailmerge"
ADD FOREIGN KEY "agencydetails" ("agencyid" ASC)
REFERENCES "pears"."agencydetails" ("agencyid")
ON DELETE SET NULL
go