List of unused columns/tables in the database structure

From OpenPetra Wiki
Jump to navigation Jump to search

This is a list of columns or even tables in petra.xml, that should be removed, because they are not used.

Please always add a comment, whether or where it has been used in the old Progress code.

  • a_accounting_period.a_effective_date_d: Only used in the setup screen for the accounting periods, progress\petra\finance\glsetup\gs1014p.p
  • a_ledger.a_current_accounting_period_i: deprecated; not used at the moment; please use a_current_period_i
  • a_ledger.a_periods_per_financial_year_i: deprecated; not used at the moment; please use a_number_of_accounting_periods_i
  • a_ledger.a_last_gift_number_i: does not make much sense, does it?
  • a_accounting_period.a_effective_date_d: contains an old date in the live database, never gets updated in the year end process
  • p_family.p_family_members_l: see comment in dbdoc: Flag is set if there are family members with their own records in the p_person table. IMPORTANT: Don't rely on this flag anymore but determine this state on-the-fly! Reason: The value of this field isn't maintained reliably any more and the field will be removed in a future version of the DB!
  • table a_ep_account is new, but is not used yet. settings in the RemoteClient.config file are used instead

List of names which shall be changed something

  • a_transaction.a_debit_credit_indicator_l: The name is mistakable. The name a_transaction.a_is_debit_indicator_l may be something more clear.
  • a_recurring_gift_detail.a_gift_amount_n should be renamed to a_gift_transaction_amount_n, to reflect that this amount is in the transaction currency. In analogy to a_gift_detail, a_gift_amount_n is the amount in base currency

Decision necessary

a_ledger.a_year_end_flag_l and a_ledger.a_provisional_year_end_flag_l

Actually the columns a_ledger.a_year_end_flag_l and a_ledger.a_provisional_year_end_flag_l seems to be the boolean inverse of each other.

They are set in GL3240.p Line 849 and 850 to

a_ledger.a_year_end_flag_l = TRUE
a_ledger.a_provisional_year_end_flag_l = FALSE

and reset in GL4200.p Line 736 and 737

The lines 885 and 886 are part of an obsolete code.

The parameter a_ledger.a_year_end_flag_l is only used one time in gl3240.p line 284 and the other parameter is used more than 10 times. Some appearances are in a comment and some in an obsolete code. So 21 hits - 3 assignments is not quite correct. I think that the slight difference of the parameters only has been available in older petra versions and the parameters history will give a better answer to keep or to skip the parameter.

Actually I use it in my code as it was used in petra.