support #381

Merged
edraft merged 31 commits from support into master 2023-09-28 20:03:32 +02:00
3 changed files with 32 additions and 3 deletions
Showing only changes of commit 94e003312d - Show all commits

View File

@ -16,7 +16,7 @@ class FeatureFlagsEnum(Enum):
level_module = "LevelModule"
moderator_module = "ModeratorModule"
permission_module = "PermissionModule"
short_role_name = "ShortRoleName"
short_role_name_module = "ShortRoleNameModule"
# features
api_only = "ApiOnly"
presence = "Presence"

View File

@ -18,7 +18,7 @@ class FeatureFlagsSettings(ConfigurationModelABC):
FeatureFlagsEnum.moderator_module.value: False, # 02.10.2022 #48
FeatureFlagsEnum.permission_module.value: True, # 02.10.2022 #48
FeatureFlagsEnum.config_module.value: True, # 19.07.2023 #127
FeatureFlagsEnum.short_role_name.value: False, # 28.09.2023 #378
FeatureFlagsEnum.short_role_name_module.value: False, # 28.09.2023 #378
# features
FeatureFlagsEnum.api_only.value: False, # 13.10.2022 #70
FeatureFlagsEnum.presence.value: True, # 03.10.2022 #56

View File

@ -15,8 +15,37 @@ class FixUpdatesMigration(MigrationABC):
def upgrade(self):
self._logger.debug(__name__, "Running upgrade")
self._cursor.execute(
str(
f"""
ALTER TABLE CFG_ServerHistory
ADD DefaultRoleId BIGINT NULL AFTER LoginMessageChannelId;
"""
)
)
self._cursor.execute(
str(
"""ALTER TABLE CFG_TechnicianHistory ADD FeatureFlags JSON NULL DEFAULT ('{}') AFTER CacheMaxMessages;"""
)
)
self._cursor.execute(
str(
"""ALTER TABLE CFG_ServerHistory ADD FeatureFlags JSON NULL DEFAULT ('{}') AFTER LoginMessageChannelId;"""
)
)
self._exec(__file__, "config/server.sql")
self._exec(__file__, "config/technician.sql")
def downgrade(self):
pass
self._cursor.execute(
str(
f"""
ALTER TABLE CFG_ServerHistory DROP COLUMN DefaultRoleId;
"""
)
)
self._cursor.execute("ALTER TABLE CFG_TechnicianHistory DROP COLUMN FeatureFlags;")
self._cursor.execute("ALTER TABLE CFG_ServerHistory DROP COLUMN FeatureFlags;")