moped_proj_funding

3 rows


Description

Main source for a project’s funding

Columns

Column Type Size Nulls Auto Default Children Parents Comments
proj_funding_id serial 10 nextval('moped_proj_fund_source_proj_fund_source_id_seq'::regclass)
project_id int4 10 null
moped_project.project_id moped_proj_fund_source_project_id_fkeyC
created_at timestamptz 35,6 now()
created_by_user_id int4 10 null
moped_users.user_id created_by_user_fkeyR
funding_source_id int4 10 null
moped_fund_sources.funding_source_id moped_proj_funding_funding_source_id_fkeyR
funding_program_id int4 10 null
moped_fund_programs.funding_program_id moped_proj_funding_funding_program_id_fkeyR
funding_amount int4 10 null
funding_description text 2147483647 null
funding_status_id int4 10 null
moped_fund_status.funding_status_id moped_proj_funding_funding_status_id_fkeyR
fund jsonb 2147483647 null
dept_unit jsonb 2147483647 null
is_deleted bool 1 false

Indicates soft deletion

updated_at timestamptz 35,6 now()

Timestamp when the record was last updated

updated_by_user_id int4 10 null
moped_users.user_id updated_by_user_fkeyR

ID of the user who last updated the record

fund_dept_unit text 2147483647 CASE WHEN ((fund IS NULL) OR (dept_unit IS NULL)) THEN NULL::text ELSE ((((COALESCE((fund ->> 'fund_id'::text), ' '::text) || ' '::text) || COALESCE((dept_unit ->> 'dept'::text), ' '::text)) || ' '::text) || COALESCE((dept_unit ->> 'unit'::text), ' '::text)) END

Fund, department, and unit numbers concatenated; null if fund or unit is not populated

fund_name text 2147483647 CASE WHEN (fund IS NULL) THEN NULL::text ELSE COALESCE((fund ->> 'fund_name'::text), ' '::text) END

Fund name; null if fund is not populated

Indexes

Constraint Name Type Sort Column(s)
moped_proj_fund_source_pkey Primary key Asc proj_funding_id

Relationships