eeprom/database/2023_11_07_171343_fixed_table_inconsistencies.php

22 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2023-11-07 19:14:58 +00:00
<?php
use Index\Db\DbConnection;
use Index\Db\Migration\DbMigration;
2023-11-07 19:14:58 +00:00
final class FixedTableInconsistencies_20231107_171343 implements DbMigration {
public function migrate(DbConnection $conn): void {
2023-11-07 19:14:58 +00:00
$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;
');
}
}