diff --git a/edb/schema/unknown_pointers.py b/edb/schema/unknown_pointers.py index 88be760f24b..8ff96f7bd22 100644 --- a/edb/schema/unknown_pointers.py +++ b/edb/schema/unknown_pointers.py @@ -166,6 +166,10 @@ def _cmd_tree_from_ast( qlast.AlterConcreteProperty if isinstance(obj, s_props.Property) else qlast.AlterConcreteLink + ) if isinstance(astnode, qlast.AlterObject) else ( + qlast.CreateConcreteProperty + if isinstance(obj, s_props.Property) + else qlast.CreateConcreteLink ) astnode = astnode.replace(__class__=astcls) qlparser.append_module_aliases(astnode, context.modaliases) diff --git a/tests/test_schema.py b/tests/test_schema.py index fb32673722d..104228961ec 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -10200,6 +10200,27 @@ def test_schema_describe_name_override_03(self): """ ) + def test_schema_describe_overload_01(self): + self._assert_describe( + """ + abstract type Animal { + name: str; + parent: Animal; + } + type Human extending Animal { + overloaded parent: Human; + } + """, + + 'describe type test::Human as sdl', + + """ + type test::Human extending test::Animal { + overloaded link parent: test::Human; + }; + """, + ) + class TestCreateMigration(tb.BaseSchemaTest):