====== pears.CompanyStatus ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Look-up of company statuses (both inbuilt and user defined)
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **CompanyStatusID** | char(1) | NOT NULL | | |
| Name | char(40) | NOT NULL | | |
| Help | char(40) | NULL | | |
| IsFixed | smallint | NULL | 0 | |
| Sortorder | integer | NULL | | |
| GridSortorder | integer | NULL | | |
| BackgroundColour | integer | NULL | 16777215 | |
| FontColour | integer | NULL | 0 | |
| OverrideFormColour | tinyint | NULL | 0 | |
===== Primary Key =====
* CompanyStatusID
===== Foreign Keys =====
* No outgoing foreign keys found.
===== Referenced By =====
^ Table ^ Constraint ^ Columns ^ Referenced columns ^
| [[database:tables:pears_company|pears.Company]] | companystatus | status | CompanyStatusID |
===== Indexes =====
* No indexes found.
===== Triggers =====
^ Name ^ Timing ^ Event ^
| WPK_companystatus_COMPANYSTATUS | after | insert,delete,update order 1 |
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."CompanyStatus"
-- Table comment: Look-up of company statuses (both inbuilt and user defined)
-- Statement count: 4
CREATE TABLE "pears"."CompanyStatus" (
"CompanyStatusID" char(1) NOT NULL
,"Name" char(40) NOT NULL
,"Help" char(40) NULL
,"IsFixed" smallint NULL DEFAULT 0
,"Sortorder" integer NULL
,"GridSortorder" integer NULL
,"BackgroundColour" integer NULL DEFAULT 16777215
,"FontColour" integer NULL DEFAULT 0
,"OverrideFormColour" tinyint NULL DEFAULT 0
,PRIMARY KEY ("CompanyStatusID" ASC)
)
go
COMMENT ON TABLE "pears"."CompanyStatus" IS
'Look-up of company statuses (both inbuilt and user defined)'
go
create trigger "WPK_companystatus_COMPANYSTATUS" after insert,delete,update order 1 on
"pears"."companystatus"
for each statement
begin
call "WPKTrackChange"('P','COMPANYSTATUS')
end
go
COMMENT TO PRESERVE FORMAT ON TRIGGER "pears"."CompanyStatus"."WPK_companystatus_COMPANYSTATUS" IS
{create trigger WPK_companystatus_COMPANYSTATUS
after insert,delete,update order 1 on
companystatus
for each statement
begin
call WPKTrackChange('P','COMPANYSTATUS')
end
}
go