2023-07-28 23:17:33 +00:00
|
|
|
<?php
|
2024-10-05 02:40:29 +00:00
|
|
|
use Index\Db\DbConnection;
|
|
|
|
use Index\Db\Migration\DbMigration;
|
2023-07-28 23:17:33 +00:00
|
|
|
|
2024-10-05 02:40:29 +00:00
|
|
|
final class CreateCountersTable_20230728_212101 implements DbMigration {
|
|
|
|
public function migrate(DbConnection $conn): void {
|
2023-07-28 23:17:33 +00:00
|
|
|
$conn->execute('
|
|
|
|
CREATE TABLE msz_counters (
|
|
|
|
counter_name VARBINARY(64) NOT NULL,
|
|
|
|
counter_value BIGINT(20) NOT NULL DEFAULT "0",
|
|
|
|
counter_updated TIMESTAMP NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
|
|
PRIMARY KEY (counter_name)
|
|
|
|
) ENGINE=InnoDB COLLATE=utf8mb4_bin
|
|
|
|
');
|
|
|
|
}
|
|
|
|
}
|