Skip to content

Remove type-aware ordering in ElementPath creation

Refs https://redmine.teklia.com/issues/3735

The main goal is to remove the type-aware ordering when a new path is created through add_parent. This would allow us to later add a unique constraint on ElementPath (path, ordering).

Steps:

  1. remove type_ordering option in Element.add_parent
  2. always use the max value as next order
  3. introduce an invalid DB constraint to prevent new invalid data to enter the DB