From 60bd8178e88ccf68c3d5c9bb91cc385ef16a24ea Mon Sep 17 00:00:00 2001 From: julien Date: Mon, 9 Mar 2026 03:12:03 +0100 Subject: [PATCH] Removed migrations for now --- public/index.php | 11 +++++++++++ scripts/migrations.php | 34 ---------------------------------- 2 files changed, 11 insertions(+), 34 deletions(-) delete mode 100644 scripts/migrations.php diff --git a/public/index.php b/public/index.php index 874588e..6efd9e9 100644 --- a/public/index.php +++ b/public/index.php @@ -60,6 +60,17 @@ if (!isset($medooOptions['database_name'])) { } $database = new Medoo($medooOptions); +// Créer la table si nécessaire (schéma minimal) +$database->query( + <<<'SQL' +CREATE TABLE IF NOT EXISTS post ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + title TEXT NOT NULL, + content TEXT NOT NULL +); +SQL +); + // ------------------------- // Services (container simple) // ------------------------- diff --git a/scripts/migrations.php b/scripts/migrations.php deleted file mode 100644 index c213412..0000000 --- a/scripts/migrations.php +++ /dev/null @@ -1,34 +0,0 @@ - 'sqlite', - 'database_file' => $dbFile, -]); - -// schéma minimal — CREATE TABLE IF NOT EXISTS est idempotent -$database->query( - <<<'SQL' -CREATE TABLE IF NOT EXISTS post ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - title TEXT NOT NULL, - content TEXT NOT NULL -); -SQL -); - -echo "Migrations applied (minimal).\n";