Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a cfg::BranchConfig alias for cfg::DatabaseConfig #6984

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion edb/buildmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@


# Increment this whenever the database layout or stdlib changes.
EDGEDB_CATALOG_VERSION = 2024_02_28_00_00
EDGEDB_CATALOG_VERSION = 2024_03_04_00_00
EDGEDB_MAJOR_VERSION = 6


Expand Down
1 change: 1 addition & 0 deletions edb/edgeql/compiler/schemactx.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def derive_view(
mark_derived=True,
transient=True,
attrs=attrs,
stdmode=ctx.env.options.bootstrap_mode,
)

if (
Expand Down
1 change: 1 addition & 0 deletions edb/lib/cfg.edgeql
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ ALTER TYPE cfg::AbstractConfig {
CREATE TYPE cfg::Config EXTENDING cfg::AbstractConfig;
CREATE TYPE cfg::InstanceConfig EXTENDING cfg::AbstractConfig;
CREATE TYPE cfg::DatabaseConfig EXTENDING cfg::AbstractConfig;
CREATE ALIAS cfg::BranchConfig := cfg::DatabaseConfig;


CREATE FUNCTION
Expand Down
1 change: 1 addition & 0 deletions edb/schema/expraliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ def compile_alias_expr(
modaliases=context.modaliases,
schema_view_mode=True,
in_ddl_context_name='alias definition',
bootstrap_mode=context.stdmode,
),
)

Expand Down
2 changes: 2 additions & 0 deletions edb/schema/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def derive_subtype(
inheritance_merge: bool = True,
transient: bool = False,
inheritance_refdicts: Optional[AbstractSet[str]] = None,
stdmode: bool = False,
**kwargs: Any,
) -> typing.Tuple[s_schema.Schema, TypeT]:

Expand Down Expand Up @@ -202,6 +203,7 @@ def derive_subtype(
context = sd.CommandContext(
modaliases={},
schema=schema,
stdmode=stdmode,
)

delta = sd.DeltaRoot()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_server_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ async def test_server_proto_configure_05(self):

await self.assert_query_result(
'''
SELECT cfg::DatabaseConfig.__internal_sess_testvalue
SELECT cfg::BranchConfig.__internal_sess_testvalue
''',
[
3
Expand Down