====== pears.StagedPayments ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Description ===== For dealing with staggered payments for perms. ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **StagedPaymentID** | char(20) | NOT NULL | | | | PlacementID | char(20) | NULL | | | | Description | char(50) | NULL | | | | ActionDate | date | NULL | | | | InvoiceFrequency | char(1) | NULL | | eekly, <2> weekly, <4> weekly, onthly | | Amount | double | NULL | 0 | | | Billed | smallint | NULL | 0 | | | Paid | smallint | NULL | 0 | | | Credited | smallint | NULL | 0 | | ===== Primary Key ===== * StagedPaymentID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | placement | PlacementID | [[database:tables:pears_placement|pears.Placement (placementid)]] | ON DELETE CASCADE | ===== Referenced By ===== * No incoming foreign keys found. ===== Indexes ===== * No indexes found. ===== Triggers ===== * No triggers found. ===== Original SQL ===== -- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."StagedPayments" -- Table comment: For dealing with staggered payments for perms. -- Statement count: 4 CREATE TABLE "pears"."StagedPayments" ( "StagedPaymentID" char(20) NOT NULL ,"PlacementID" char(20) NULL ,"Description" char(50) NULL ,"ActionDate" date NULL ,"InvoiceFrequency" char(1) NULL ,"Amount" double NULL DEFAULT 0 ,"Billed" smallint NULL DEFAULT 0 ,"Paid" smallint NULL DEFAULT 0 ,"Credited" smallint NULL DEFAULT 0 ,PRIMARY KEY ("StagedPaymentID" ASC) ) go COMMENT ON COLUMN "pears"."StagedPayments"."InvoiceFrequency" IS 'eekly, <2> weekly, <4> weekly, onthly' go COMMENT ON TABLE "pears"."StagedPayments" IS 'For dealing with staggered payments for perms.' go ALTER TABLE "pears"."StagedPayments" ADD FOREIGN KEY "placement" ("PlacementID" ASC) REFERENCES "pears"."Placement" ("placementid") ON DELETE CASCADE go