PDO::ERRMODE_EXCEPTION, ]); $pdo->exec(' CREATE TABLE IF NOT EXISTS schema_migrations ( name TEXT NOT NULL PRIMARY KEY, applied_at TIMESTAMP NOT NULL DEFAULT NOW() ) '); // Migrations déjà appliquées avant la mise en place de ce système $alreadyApplied = [ 'migration_001_roles_ratings.sql', 'migration_002_profile_url.sql', 'migration_003_profile_slug.sql', 'migration_004_profile_bio.sql', 'migration_005_rss_feeds.sql', 'migration_006_profile_links.sql', ]; $stmt = $pdo->prepare('INSERT INTO schema_migrations (name) VALUES (?) ON CONFLICT DO NOTHING'); foreach ($alreadyApplied as $name) { $stmt->execute([$name]); echo " ✓ marquée : $name\n"; } echo "\nInitialisation terminée. Vous pouvez supprimer ce fichier.\n";