ADVOCACYPETITION
Advocacy Petition
Primary Key
| Primary Key | Field Type | 
|---|---|
| ID | uniqueidentifier | 
Fields
| Field | Field Type | Null | Notes | Description | 
|---|---|---|---|---|
| DATEADDED | datetime | Default = getdate() | Indicates the date this record was added. | |
| DATECHANGED | datetime | Default = getdate() | Indicates the date this record was last changed. | |
| TS | timestamp | Timestamp. | ||
| TSLONG | bigint (Computed) | yes | CONVERT(bigint, TS) | Numeric representation of the timestamp. | 
| FEDERALDISTRICTCODE | nvarchar(4) | Default = '' | ||
| UPPERSTATEDISTRICTCODE | nvarchar(5) | Default = '' | ||
| LOWERSTATEDISTRICTCODE | nvarchar(5) | Default = '' | ||
| ISANONYMOUS | bit | Default = 0 | 
Foreign Keys
| Foreign Key | Field Type | Null | Notes | Description | 
|---|---|---|---|---|
| ACTIONITEMID | uniqueidentifier | ACTION_ITEM.ID | ActionItemID | |
| CONSTITUENTID | uniqueidentifier | CONSTITUENT.LOCALID | ConstituentID | |
| ADDEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
| CHANGEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
| SITECONTENTID | int | SiteContent.ID | SiteContentId | 
Indexes
| Index Name | Fields | Unique | Primary | Clustered | 
|---|---|---|---|---|
| IX_ADVOCACYPETITION_DATEADDED | DATEADDED | yes | ||
| IX_ADVOCACYPETITION_DATECHANGED | DATECHANGED | |||
| PK_ADVOCACYPETITION | ID | yes | yes | |
| UIX_ADVOCACYPETITION_ACTIONITEMID_CONSTITUENTID | ACTIONITEMID, CONSTITUENTID | yes | 
Triggers
| Trigger Name | Description | 
|---|---|
| TR_ADVOCACYPETITION_AUDIT_UPDATE | |
| TR_ADVOCACYPETITION_AUDIT_DELETE |