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() ) '); // Toutes les migrations appliquées manuellement avant l'automatisation $alreadyApplied = [ 'migration_000_initial_schema.sql', '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', 'migration_007_comment_verify_token.sql', 'migration_008_user_profiles.sql', 'migration_009_journal_smtp.sql', 'migration_010_role_capabilities.sql', 'migration_011_user_capabilities.sql', 'migration_012_users.sql', 'migration_013_profiles.sql', 'migration_014_app_config.sql', 'migration_015_mail_queue.sql', 'migration_016_dictionary.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";