This repository has been archived on 2025-01-28. You can view files and clone it, but cannot push or open issues or pull requests.
misuzu-interim/database/2023_07_28_212101_create_counters_table.php

16 lines
613 B
PHP

<?php
use Index\Db\DbConnection;
use Index\Db\Migration\DbMigration;
final class CreateCountersTable_20230728_212101 implements DbMigration {
public function migrate(DbConnection $conn): void {
$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
');
}
}