Quick updates:

- Set default language for admins when running the db patch
    - Updating addaccess command.
    - Update levels for some commands in mod_command.
This commit is contained in:
adator
2025-08-30 23:09:03 +02:00
parent b306968115
commit e79c15188e
5 changed files with 78 additions and 54 deletions

View File

@@ -600,7 +600,9 @@ class Base:
def db_patch(self, table_name: str, column_name: str, column_type: str) -> bool:
if not self.db_is_column_exist(table_name, column_name):
patch = f"ALTER TABLE {self.Config.TABLE_ADMIN} ADD COLUMN {column_name} {column_type}"
update_row = f"UPDATE {self.Config.TABLE_ADMIN} SET language = 'EN' WHERE language is null"
self.db_execute_query(patch)
self.db_execute_query(update_row)
self.logs.debug(f"The patch has been applied")
self.logs.debug(f"Table name: {table_name}, Column name: {column_name}, Column type: {column_type}")
return True