support #381
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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;")
|
||||
|
Loading…
Reference in New Issue
Block a user