acq.fund

Cascading Deletes: Deleting rows from this table will cascade to: actor.org_unit.

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: fund_currency_type_fkey, fund_org_fkey.

Columns

Column Type Nullable Default Notes

id PK

integer

No

nextval('acq.fund_id_seq'::regclass)

org FK

integer

No

actor.org_unit(id)

name

text

No

year

integer

No

EXTRACT(year FROM now())

currency_type FK

text

No

acq.currency_type(code)

code

text

No

rollover

boolean

No

false

propagate

boolean

No

true

active

boolean

No

true

balance_warning_percent

integer

Yes

balance_stop_percent

integer

Yes

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

currency_type

acq.currency_type(code)

NO ACTION

NO ACTION

DEFERRED

fund_currency_type_fkey

org

actor.org_unit(id)

CASCADE

CASCADE

DEFERRED

fund_org_fkey

Unique Constraints

  • code_once_per_org_year: (org, code, year)

  • name_once_per_org_year: (org, name, year)

Check Constraints

  • acq_fund_rollover_implies_propagate: CHECK propagate OR (NOT rollover)

Indexes

Index Method Definition

fund_pkey PK

btree

CREATE UNIQUE INDEX fund_pkey ON acq.fund USING btree (id)

code_once_per_org_year UNIQUE

btree

CREATE UNIQUE INDEX code_once_per_org_year ON acq.fund USING btree (org, code, year)

name_once_per_org_year UNIQUE

btree

CREATE UNIQUE INDEX name_once_per_org_year ON acq.fund USING btree (org, name, year)

Referenced By

The following tables have foreign keys pointing to acq.fund (10 referencing table(s)):

Table Referencing Column(s) Referenced Column(s) Constraint

acq.distribution_formula_entry

fund

id

distribution_formula_entry_fund_fkey

acq.fund_allocation

fund

id

fund_allocation_fund_fkey

acq.fund_debit

fund

id

fund_debit_fund_fkey

acq.fund_debit

xfer_destination

id

fund_debit_xfer_destination_fkey

acq.fund_tag_map

fund

id

fund_tag_map_fund_fkey

acq.fund_transfer

dest_fund

id

fund_transfer_dest_fund_fkey

acq.fund_transfer

src_fund

id

fund_transfer_src_fund_fkey

acq.invoice_item

fund

id

invoice_item_fund_fkey

acq.lineitem_detail

fund

id

lineitem_detail_fund_fkey

acq.po_item

fund

id

po_item_fund_fkey