2
0
Fork 0
forked from flashii/eeprom
eeprom-nabucco/database/2023_11_07_171343_fixed_table_inconsistencies.php

21 lines
1.2 KiB
PHP

<?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;
');
}
}