2
0
Fork 0
forked from flashii/eeprom

Fixed table inconsistencies.

This commit is contained in:
flash 2023-11-07 19:14:58 +00:00
parent d6800f9b6f
commit 7ae79a012b

View file

@ -0,0 +1,21 @@
<?php
use Index\Data\IDbConnection;
use Index\Data\Migration\IDbMigration;
final class FixedTableInconsistencies_20231107_171343 implements IDbMigration {
public function migrate(IDbConnection $conn): void {
$conn->execute('
ALTER TABLE prm_uploads
CHANGE COLUMN upload_name upload_name VARCHAR(255) NOT NULL COLLATE "utf8mb4_unicode_520_ci" AFTER upload_bump,
CHANGE COLUMN upload_type upload_type VARCHAR(255) NOT NULL COLLATE "ascii_general_ci" AFTER upload_name;
');
$conn->execute('
ALTER TABLE prm_applications
CHANGE COLUMN app_name app_name VARCHAR(50) NOT NULL COLLATE "utf8mb4_unicode_520_ci" AFTER app_id,
CHANGE COLUMN app_size_limit app_size_limit INT(11) UNSIGNED NOT NULL AFTER app_created,
CHANGE COLUMN app_allow_size_multiplier app_allow_size_multiplier TINYINT(4) UNSIGNED NOT NULL DEFAULT "0" AFTER app_size_limit,
CHANGE COLUMN app_expiry app_expiry INT(11) UNSIGNED NOT NULL AFTER app_allow_size_multiplier;
');
}
}