Improved migrations

This commit is contained in:
julien
2026-03-09 17:06:04 +01:00
parent 17ab48abf0
commit ace21bd26c
2 changed files with 10 additions and 2 deletions

View File

@@ -6,9 +6,16 @@ namespace App\Database;
use Medoo\Medoo;
final class Migration
final class Migrator
{
public static function run(Medoo $db): void
{
self::createPostTable($db);
// self::createCommentsTable($db);
// self::createUsersTable($db);
}
private static function createPostTable(Medoo $db): void
{
$db->pdo->exec("
CREATE TABLE IF NOT EXISTS post (