This table provides a list of valid subledger accounts.
Source romber_subledger_accounts_tbl.sql
create table romber_financial.subledger_accounts ( item_instance_id romber_item.instance_id not null, item_type_id romber_item.type_id not null, member_basemember_id romber_member.basemember_id not null, member_relationship_id romber_member.relationship_id not null, reference_code romber_base.generic_code not null, subledger_account_id romber_financial.subledger_account_id not null default nextval ( 'romber_base.generic_id_seq' ), subledger_type_id romber_financial.subledger_type_id not null );
Source romber_subledger_accounts_pk.sql
alter table romber_financial.subledger_accounts add constraint romber_subledger_accounts_pk primary key ( subledger_account_id );
Source romber_subledger_accounts_uk1.sql
alter table romber_financial.subledger_accounts add constraint romber_financial_subledger_accounts_uk1 unique ( reference_code, subledger_account_id );
Source romber_subledger_accounts_fk1.sql
alter table romber_financial.subledger_accounts add constraint romber_subledger_accounts_fk1 foreign key ( subledger_account_id ) references romber_meta.objects ( meta_object_id );
Source romber_subledger_accounts_fk2.sql
alter table romber_financial.subledger_accounts add constraint romber_subledger_accounts_fk2 foreign key ( subledger_type_id ) references romber_financial.subledger_types ( subledger_type_id );
Source romber_subledger_accounts_fk3.sql
alter table romber_financial.subledger_accounts add constraint romber_subledger_accounts_fk3 foreign key ( item_instance_id ) references romber_item.instances ( item_instance_id );
Source romber_subledger_accounts_fk4.sql
alter table romber_financial.subledger_accounts add constraint romber_subledger_accounts_fk4 foreign key ( item_type_id ) references romber_item.types ( item_type_id );
Source romber_subledger_accounts_fk5.sql
alter table romber_financial.subledger_accounts add constraint romber_subledger_accounts_fk5 foreign key ( member_basemember_id ) references romber_member.basemembers ( member_basemember_id );
Source romber_subledger_accounts_fk6.sql
alter table romber_financial.subledger_accounts add constraint romber_subledger_accounts_fk6 foreign key ( member_relationship_id ) references romber_member.relationships ( member_relationship_id );
Source romber_subledger_accounts_load.sql
insert into romber_financial.subledger_accounts ( item_instance_id, item_type_id, member_basemember_id, member_relationship_id, reference_code, subledger_account_id, subledger_type_id ) values ( 0, 0, 0, 0, '', 0, 0 );