Table of Contents



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

Foreign Keys

Constraint Columns References Delete/update action
IQXNetUser IQXNetUserID pears.IQXNetUser (IQXNetUserID) NOT NULL; ON DELETE CASCADE

Referenced By

Indexes

Name Type Columns Detail
IQXNetAuditByUser Index IQXNetUserID, ActionType, ActionTime
IQXNetAuditByType Index ActionType, RecordID
IQXNetAuditByRecord Index RecordID

Triggers

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