Skip to content

Commit

Permalink
Fix ADMINISTER schema_repair() (#8279)
Browse files Browse the repository at this point in the history
It got fully broken by an extra argument being added to some (but not
all) s_ddl functions.  Since arguments were being passed in a big
untyped kwargs and there wasn't a test, it got missed.

Add a test, too.
  • Loading branch information
msullivan committed Jan 30, 2025
1 parent 54851df commit 49e45fc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions edb/schema/ddl.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ def apply_ddl_script_ex(
stdmode: bool = False,
internal_schema_mode: bool = False,
testmode: bool = False,
store_migration_sdl: bool=False,
schema_object_ids: Optional[
Mapping[Tuple[sn.Name, Optional[str]], uuid.UUID]
]=None,
Expand All @@ -639,6 +640,7 @@ def apply_ddl_script_ex(
stdmode=stdmode,
internal_schema_mode=internal_schema_mode,
testmode=testmode,
store_migration_sdl=store_migration_sdl,
schema_object_ids=schema_object_ids,
compat_ver=compat_ver,
)
Expand Down
10 changes: 10 additions & 0 deletions tests/test_edgeql_ddl.py
Original file line number Diff line number Diff line change
Expand Up @@ -17415,6 +17415,16 @@ async def test_edgeql_ddl_rebase_views_02(self):
[{}],
)

async def test_edgeql_ddl_schema_repair(self):
await self.con.execute('''
create type Tgt {
create property lol := count(Object)
}
''')
await self.con.execute('''
administer schema_repair()
''')

async def test_edgeql_ddl_alias_and_create_set_required(self):
await self.con.execute(r"""
create type T;
Expand Down

0 comments on commit 49e45fc

Please sign in to comment.