-
I’m curious what happens when you radically change the class (or “object type”) hierarchy? Suppose you have these classes with various properties defined at each level: Country extends Place If I now change so that Country extends a completely different class with no relationship to Place or Item. What will happen to:
Is there some documentation around these “schema and class hierarchy change” scenarios and possible edge cases here? Trying to understand better the repercussions of frequent class hierarchy changes … Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Normally changing the object type base results in an However, if the object type changes are so large so that its "similarity" to the original type is very low, the schema diff algorithm might generate a |
Beta Was this translation helpful? Give feedback.
-
Thank you for the great answer @elprans! I marked it as answered. ps1. ps2. |
Beta Was this translation helpful? Give feedback.
Normally changing the object type base results in an
ALTER TYPE Foo {EXTENDING NewBase; DROP EXTENDING OldBase}
. Like with allALTER
-s objects stay in place, but properties or links might get dropped/added depending on how the layout changed due to the parent object type changes. In this regard, change of type hierarchy is not very different from most type alterations.However, if the object type changes are so large so that its "similarity" to the original type is very low, the schema diff algorithm might generate a
DROP TYPE Foo; CREATE TYPE Foo { ... }
sequence, which is where all existing objects would be deleted. This is whyedgedb migration create
asks the "did you do X" questions t…