====== pears.TagCompliance ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Used for tag with expiry dates - set sms/email messages
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **tagComplianceid** | char(20) | NOT NULL | | |
| taglocation | char(3) | NULL | | |
| tagid | char(3) | NULL | | |
| SMS | long varchar | NULL | | |
| Email | long varchar | NULL | | |
===== Primary Key =====
* tagComplianceid
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| tag | taglocation, tagid | [[database:tables:pears_tag|pears.tag (taglocation, tagid)]] | ON DELETE CASCADE |
===== Referenced By =====
* No incoming foreign keys found.
===== Indexes =====
^ Name ^ Type ^ Columns ^ Detail ^
| tagCompliance_id | Index | taglocation, tagid | |
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."TagCompliance"
-- Table comment: Used for tag with expiry dates - set sms/email messages
-- Statement count: 4
CREATE TABLE "pears"."TagCompliance" (
"tagComplianceid" char(20) NOT NULL
,"taglocation" char(3) NULL
,"tagid" char(3) NULL
,"SMS" long varchar NULL
,"Email" long varchar NULL
,PRIMARY KEY ("tagComplianceid" ASC)
)
go
COMMENT ON TABLE "pears"."TagCompliance" IS
'Used for tag with expiry dates - set sms/email messages'
go
ALTER TABLE "pears"."TagCompliance"
ADD FOREIGN KEY "tag" ("taglocation" ASC,"tagid" ASC)
REFERENCES "pears"."tag" ("taglocation","tagid")
ON DELETE CASCADE
go
CREATE INDEX "tagCompliance_id" ON "pears"."TagCompliance"
( "taglocation","tagid" )
go