LedgerSMB icon indicating copy to clipboard operation
LedgerSMB copied to clipboard

Remove table inheritance

Open neilt opened this issue 11 months ago • 2 comments

There are 4 tables that have children through inheritance.

  1. note
  2. file_base
  3. translation
  4. file_secondary_attachment

There does not seem clear reasons why inherited tables are used. Covert all to regular tables. Then convert the used serial columns to use IDENTITY.

The reason for this is for clarity and improved code quality. Table inheritance is is often misunderstood.

From the Postgres docs, "Unique constraints and primary keys are not inherited in the current implementation. This makes the combination of inheritance and unique constraints rather dysfunctional."

neilt avatar Feb 25 '24 14:02 neilt