23 lines
1.1 KiB
PHP
23 lines
1.1 KiB
PHP
<?php
|
|
use Index\Db\DbConnection;
|
|
use Index\Db\Migration\DbMigration;
|
|
|
|
final class CreateChatServersTable_20250422_203044 implements DbMigration {
|
|
public function migrate(DbConnection $conn): void {
|
|
$conn->execute(<<<SQL
|
|
CREATE TABLE msz_chat_servers (
|
|
server_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
server_order INT(11) NOT NULL DEFAULT '0',
|
|
server_proto VARCHAR(255) NOT NULL COLLATE 'ascii_general_ci',
|
|
server_secure TINYINT(3) UNSIGNED NOT NULL,
|
|
server_uri VARCHAR(255) NOT NULL COLLATE 'ascii_bin',
|
|
server_created TIMESTAMP NOT NULL DEFAULT current_timestamp(),
|
|
PRIMARY KEY (server_id),
|
|
KEY msz_chat_servers_order_index (server_order),
|
|
KEY msz_chat_servers_proto_index (server_proto),
|
|
KEY msz_chat_servers_secure_index (server_secure),
|
|
KEY msz_chat_servers_created_index (server_created)
|
|
) COLLATE='utf8mb4_bin' ENGINE=InnoDB
|
|
SQL);
|
|
}
|
|
}
|