mirror of
https://github.com/GaMeNu/HFCNotificator.git
synced 2024-11-16 07:14:52 +02:00
v2.2.0
Fix create_db.py, update_db.py
This commit is contained in:
parent
1477003229
commit
54d1e08078
@ -81,7 +81,7 @@ CREATE TABLE IF NOT EXISTS `hfc_db`.`channels` (
|
||||
`channel_id` BIGINT(8) UNSIGNED NOT NULL,
|
||||
`server_id` BIGINT(8) UNSIGNED NULL,
|
||||
`channel_lang` VARCHAR(15) NOT NULL,
|
||||
`locations` JSON DEFAULT JSON_ARRAY(),
|
||||
`locations` JSON NOT NULL DEFAULT ('[]'),
|
||||
PRIMARY KEY (`channel_id`),
|
||||
UNIQUE INDEX `channel_id_UNIQUE` (`channel_id` ASC) VISIBLE,
|
||||
CONSTRAINT `server_id`
|
||||
|
@ -14,9 +14,7 @@ DB_PASSWORD = os.getenv('DB_PASSWORD')
|
||||
|
||||
def updater_1_0_0(connection: mysql.connection.MySQLConnection) -> str:
|
||||
crsr = connection.cursor()
|
||||
crsr.execute('ALTER TABLE `hfc_db`.`channels` '
|
||||
'ADD COLUMN `locations` JSON '
|
||||
'DEFAULT JSON_ARRAY();')
|
||||
crsr.execute("ALTER TABLE `hfc_db`.`channels` ADD COLUMN `locations` JSON NOT NULL DEFAULT ('[]');")
|
||||
crsr.close()
|
||||
return '1.0.1'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user