Table of Contents



pears.RecentObjects

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

Description

Record of user viewing of different database objects.

Columns

Column Type Null Default Comment
StaffID char(20) NOT NULL
ObjectType char(1) NOT NULL N:ContactEvent E:Employment R:Progress T:Timesheet or ProvTimesheet
ObjectID char(20) NOT NULL
LastViewed timestamp NULL current timestamp

Primary Key

Foreign Keys

Referenced By

Indexes

Name Type Columns Detail
RecentObjects_StaffIDLastViewed Index StaffID, LastViewed

Triggers

Original SQL

-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."RecentObjects"
-- Table comment: Record of user viewing of different database objects.
-- Statement count: 4
 
CREATE TABLE "pears"."RecentObjects" (
    "StaffID"                        CHAR(20) NOT NULL
   ,"ObjectType"                     CHAR(1) NOT NULL
   ,"ObjectID"                       CHAR(20) NOT NULL
   ,"LastViewed"                     TIMESTAMP NULL DEFAULT CURRENT TIMESTAMP
   ,PRIMARY KEY ("StaffID" ASC,"ObjectType" ASC,"ObjectID" ASC) 
)
GO
 
 
COMMENT ON COLUMN "pears"."RecentObjects"."ObjectType" IS 
	'N:ContactEvent E:Employment R:Progress T:Timesheet or ProvTimesheet'
GO
 
 
COMMENT ON TABLE "pears"."RecentObjects" IS 
	'Record of user viewing of different database objects.'
GO
 
 
CREATE INDEX "RecentObjects_StaffIDLastViewed" ON "pears"."RecentObjects"
    ( "StaffID","LastViewed" DESC )
GO