Fixed migration #378
This commit is contained in:
parent
fe42d46a38
commit
94e003312d
@ -16,7 +16,7 @@ class FeatureFlagsEnum(Enum):
|
|||||||
level_module = "LevelModule"
|
level_module = "LevelModule"
|
||||||
moderator_module = "ModeratorModule"
|
moderator_module = "ModeratorModule"
|
||||||
permission_module = "PermissionModule"
|
permission_module = "PermissionModule"
|
||||||
short_role_name = "ShortRoleName"
|
short_role_name_module = "ShortRoleNameModule"
|
||||||
# features
|
# features
|
||||||
api_only = "ApiOnly"
|
api_only = "ApiOnly"
|
||||||
presence = "Presence"
|
presence = "Presence"
|
||||||
|
@ -18,7 +18,7 @@ class FeatureFlagsSettings(ConfigurationModelABC):
|
|||||||
FeatureFlagsEnum.moderator_module.value: False, # 02.10.2022 #48
|
FeatureFlagsEnum.moderator_module.value: False, # 02.10.2022 #48
|
||||||
FeatureFlagsEnum.permission_module.value: True, # 02.10.2022 #48
|
FeatureFlagsEnum.permission_module.value: True, # 02.10.2022 #48
|
||||||
FeatureFlagsEnum.config_module.value: True, # 19.07.2023 #127
|
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
|
# features
|
||||||
FeatureFlagsEnum.api_only.value: False, # 13.10.2022 #70
|
FeatureFlagsEnum.api_only.value: False, # 13.10.2022 #70
|
||||||
FeatureFlagsEnum.presence.value: True, # 03.10.2022 #56
|
FeatureFlagsEnum.presence.value: True, # 03.10.2022 #56
|
||||||
|
@ -15,8 +15,37 @@ class FixUpdatesMigration(MigrationABC):
|
|||||||
def upgrade(self):
|
def upgrade(self):
|
||||||
self._logger.debug(__name__, "Running upgrade")
|
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/server.sql")
|
||||||
self._exec(__file__, "config/technician.sql")
|
self._exec(__file__, "config/technician.sql")
|
||||||
|
|
||||||
def downgrade(self):
|
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