Skip to content

Change pure and binary check #990

@RFSH

Description

@RFSH

The current definition of pure and binary is as follows:

  • Binary: Has no inbound fkeys and two outbound fkeys. There is only a composite key constraint. This key includes all the columns from both fkeys.
  • Pure: There aren't any extra column that is not part of any keys.
  • Exceptions
    • The table can have an extra key made of one serial-typed column.
    • System columns are ignored completely (as well as the simple fkeys made of system columns)

Instead of just checking serial type and system columns, we should ignore any column that cannot be created or edited. This includes,

  • System columns.
  • Serial columns.
  • Columns that are generated and immutable per annotation.
  • Columns with "insert": false and "update": false ACL.

Another change we should make is related to the binary (fkey) check. We should ignore fkeys that are a subset of one of the fkeys that create the binary relationship. This is very similar to the check we're doing for prefilling extra foreign keys when you click "add related" for a direct inbound table. We're also making sure the extra columns are not-null, and we probably should have a similar check here. This requires more thought.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions