mirror of
https://github.com/iio612/DEFENDER.git
synced 2026-02-13 19:24:23 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user