====== pears.IQXNetAuditLog ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Audit log for actions in IQXWeb
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **IQXNetAuditLogID** | bigint | NOT NULL | autoincrement | |
| IQXNetUserID | char(20) | NOT NULL | | |
| ActionType | char(20) | NOT NULL | | |
| ActionTime | timestamp | NOT NULL | current timestamp | |
| Description | long varchar | NULL | | |
| RecordID | char(20) | NULL | | |
===== Primary Key =====
* IQXNetAuditLogID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| IQXNetUser | IQXNetUserID | [[database:tables:pears_iqxnetuser|pears.IQXNetUser (IQXNetUserID)]] | NOT NULL; ON DELETE CASCADE |
===== Referenced By =====
* No incoming foreign keys found.
===== Indexes =====
^ Name ^ Type ^ Columns ^ Detail ^
| IQXNetAuditByUser | Index | IQXNetUserID, ActionType, ActionTime | |
| IQXNetAuditByType | Index | ActionType, RecordID | |
| IQXNetAuditByRecord | Index | RecordID | |
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."IQXNetAuditLog"
-- Table comment: Audit log for actions in IQXWeb
-- Statement count: 6
CREATE TABLE "pears"."IQXNetAuditLog" (
"IQXNetAuditLogID" bigint NOT NULL DEFAULT autoincrement
,"IQXNetUserID" char(20) NOT NULL
,"ActionType" char(20) NOT NULL
,"ActionTime" timestamp NOT NULL DEFAULT current timestamp
,"Description" long varchar NULL
,"RecordID" char(20) NULL
,PRIMARY KEY ("IQXNetAuditLogID" ASC)
)
go
COMMENT ON TABLE "pears"."IQXNetAuditLog" IS
'Audit log for actions in IQXWeb'
go
ALTER TABLE "pears"."IQXNetAuditLog"
ADD NOT NULL FOREIGN KEY "IQXNetUser" ("IQXNetUserID" ASC)
REFERENCES "pears"."IQXNetUser" ("IQXNetUserID")
ON DELETE CASCADE
go
CREATE INDEX "IQXNetAuditByUser" ON "pears"."IQXNetAuditLog"
( "IQXNetUserID","ActionType","ActionTime" )
go
CREATE INDEX "IQXNetAuditByType" ON "pears"."IQXNetAuditLog"
( "ActionType","RecordID" )
go
CREATE INDEX "IQXNetAuditByRecord" ON "pears"."IQXNetAuditLog"
( "RecordID" )
go