====== pears.PayrollYear ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Details of the start and number of weeks in each payroll year.
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **YearNumber** | smallint | NOT NULL | | |
| Week1Friday | date | NOT NULL | | |
| NumberOfWeeks | smallint | NOT NULL | 52 | |
===== Primary Key =====
* YearNumber
===== Foreign Keys =====
* No outgoing foreign keys found.
===== Referenced By =====
* No incoming foreign keys found.
===== Indexes =====
* No indexes found.
===== Triggers =====
^ Name ^ Timing ^ Event ^
| UpdatePayrollCalendar | after | insert,delete,update order 1 |
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."PayrollYear"
-- Table comment: Details of the start and number of weeks in each payroll year.
-- Statement count: 4
CREATE TABLE "pears"."PayrollYear" (
"YearNumber" smallint NOT NULL
,"Week1Friday" date NOT NULL
,"NumberOfWeeks" smallint NOT NULL DEFAULT 52
,PRIMARY KEY ("YearNumber" ASC)
)
go
COMMENT ON TABLE "pears"."PayrollYear" IS
'Details of the start and number of weeks in each payroll year.'
go
create trigger "UpdatePayrollCalendar" after insert,delete,update order 1 on
"pears"."PayrollYear"
for each statement
begin
call "pears"."PopulatePayrollCalendar"()
end
go
COMMENT TO PRESERVE FORMAT ON TRIGGER "pears"."PayrollYear"."UpdatePayrollCalendar" IS
{create trigger UpdatePayrollCalendar
after insert,delete,update order 1 on
pears.PayrollYear
for each statement
begin
call pears.PopulatePayrollCalendar()
end
}
go