====== pears.phonetype ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Type & capability definitions for telephone - fax - email etc
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| sortorder | smallint | NULL | | |
| company | smallint | NULL | | |
| contact | smallint | NULL | | |
| applicant | smallint | NULL | | |
| **phonetypeid** | char(20) | NOT NULL | | |
| name | char(25) | NOT NULL | | |
| Capabilities | char(20) | NULL | | mail ax ial MS RL Social edia |
| AuditFlag | smallint | NULL | | |
| displaygroup | smallint | NULL | 0 | |
| displayname | char(25) | NULL | | |
| SocialMediaType | char(25) | NULL | | Only applies if Capabilities include Social edia |
===== Primary Key =====
* phonetypeid
===== Foreign Keys =====
* No outgoing foreign keys found.
===== Referenced By =====
^ Table ^ Constraint ^ Columns ^ Referenced columns ^
| [[database:tables:pears_phone|pears.phone]] | phonetype | phonetypeid | phonetypeid |
===== Indexes =====
^ Name ^ Type ^ Columns ^ Detail ^
| phonetype_sortorder | Index | sortorder | |
| phonetype_name | Index | name | |
===== Triggers =====
^ Name ^ Timing ^ Event ^
| WPKPhoneTypeChange | after | insert,delete,update |
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."phonetype"
-- Table comment: Type & capability definitions for telephone - fax - email etc
-- Statement count: 7
CREATE TABLE "pears"."phonetype" (
"sortorder" smallint NULL
,"company" smallint NULL
,"contact" smallint NULL
,"applicant" smallint NULL
,"phonetypeid" char(20) NOT NULL
,"name" char(25) NOT NULL
,"Capabilities" char(20) NULL
,"AuditFlag" smallint NULL
,"displaygroup" smallint NULL DEFAULT 0
,"displayname" char(25) NULL
,"SocialMediaType" char(25) NULL
,PRIMARY KEY ("phonetypeid" ASC)
)
go
COMMENT ON COLUMN "pears"."phonetype"."Capabilities" IS
'mail ax ial MS RL Social edia'
go
COMMENT ON COLUMN "pears"."phonetype"."SocialMediaType" IS
'Only applies if Capabilities include Social edia'
go
COMMENT ON TABLE "pears"."phonetype" IS
'Type & capability definitions for telephone - fax - email etc'
go
CREATE INDEX "phonetype_sortorder" ON "pears"."phonetype"
( "sortorder" )
go
CREATE INDEX "phonetype_name" ON "pears"."phonetype"
( "name" )
go
create trigger "WPKPhoneTypeChange" after insert,delete,update on
"pears"."PhoneType"
for each statement
begin
call "WPKTrackChange"('T','*')
end
go