VersionLicenseFlatboard

Flatboard Pro Plugin – This plugin is included in Flatboard Pro edition v5.0.5, which is currently under development.
Switch your forum's storage engine between JSON and SQLite without data loss — with a step-by-step progress UI.


🇬🇧 English

Overview

StorageMigrator is a Flatboard 5 Pro plugin that lets administrators switch the storage engine between flat JSON files and SQLite database, in either direction. Every migration is fully atomic: an automatic backup is created before any data is touched, and the switch only takes effect once the entire operation has succeeded.

The interface uses a step-by-step progress bar so you can follow the migration phase by phase in real time directly from the admin panel.

Requirements

RequirementDetails
Flatboard≥ 5.0.0
Flatboard licensePro required to use SQLite
PHP extensionpdo_sqlite (for JSON → SQLite)
Disk space≥ 100 MB free before migration

Installation

  1. Copy the StorageMigrator folder into plugins/.
  2. Activate the plugin from Admin → Plugins.
  3. The Storage Migration entry appears in the admin sidebar.

How it works

The migration runs as a sequence of AJAX steps, each confirming a phase of the underlying atomic migration:

StepWhat happens
BackupPre-flight checks (disk space, Pro license, PDO extension). The backup itself is embedded in the migration engine.
Groups → ExtrasPreparation steps that validate source data.
FinalizingTriggers the real atomic migration (JsonToSqliteMigration or SqliteToJsonMigration), updates the config, and resets the storage singleton.

If any step fails, the migration is rolled back automatically and your data remains untouched.

Switching back

StorageMigrator supports both directions:

  • JSON → SQLite — requires Flatboard Pro + pdo_sqlite
  • SQLite → JSON — always available, useful for downgrading or creating portable backups

CSRF & session safety

Each AJAX step renews the CSRF token, preventing expiration errors during long migrations. Completed steps are tracked in the PHP session to avoid double-execution on JS retry.

Routes

MethodPathDescription
GET/admin/storage-migratorAdmin interface
POST/admin/storage-migrator/stepStep-by-step endpoint (new UI)
POST/admin/storage-migrator/migrateLegacy single-call endpoint
GET/admin/storage-migrator/statusCurrent storage type + stats (JSON)

Translations

The plugin ships with six languages:

de · en · es · fr · pt · zh

To add a language, create langs/xx.json by copying en.json and translating the values.

License

GPL 3.0 — see https://flatboard.org


🇫🇷 Français

Présentation

StorageMigrator est un plugin Flatboard 5 Pro qui permet aux administrateurs de basculer le moteur de stockage entre les fichiers JSON plats et une base de données SQLite, dans les deux sens. Chaque migration est entièrement atomique : un backup automatique est créé avant toute modification des données, et la bascule n'est effective qu'une fois l'opération complète réussie.

L'interface utilise une barre de progression par étapes pour suivre la migration phase par phase en temps réel, directement depuis le panneau d'administration.

Prérequis

PrérequisDétails
Flatboard≥ 5.0.0
Licence FlatboardPro requise pour utiliser SQLite
Extension PHPpdo_sqlite (pour JSON → SQLite)
Espace disque≥ 100 Mo libres avant la migration

Installation

  1. Copiez le dossier StorageMigrator dans plugins/.
  2. Activez le plugin depuis Admin → Plugins.
  3. L'entrée Migration de Stockage apparaît dans la barre latérale admin.

Fonctionnement

La migration s'exécute en une séquence d'appels AJAX, chacun confirmant une phase de la migration atomique sous-jacente :

ÉtapeCe qui se passe
BackupVérifications préalables (espace disque, licence Pro, extension PDO). Le backup lui-même est intégré au moteur de migration.
Groupes → ExtrasÉtapes de préparation qui valident les données source.
FinalisationDéclenche la vraie migration atomique (JsonToSqliteMigration ou SqliteToJsonMigration), met à jour la config et réinitialise le singleton de storage.

En cas d'échec sur n'importe quelle étape, la migration est annulée automatiquement et vos données restent intactes.

Migration inverse

StorageMigrator supporte les deux directions :

  • JSON → SQLite — nécessite Flatboard Pro + pdo_sqlite
  • SQLite → JSON — toujours disponible, utile pour un downgrade ou la création de backups portables

Sécurité CSRF et session

Chaque appel AJAX renouvelle le token CSRF pour éviter les erreurs d'expiration lors des migrations longues. Les étapes déjà complétées sont tracées en session PHP pour éviter toute double exécution en cas de retry JS.

Routes

MéthodeCheminDescription
GET/admin/storage-migratorInterface d'administration
POST/admin/storage-migrator/stepEndpoint pas-à-pas (nouvelle UI)
POST/admin/storage-migrator/migrateEndpoint legacy (appel unique)
GET/admin/storage-migrator/statusType de stockage actuel + stats (JSON)

Traductions

Le plugin est livré avec six langues :

de · en · es · fr · pt · zh

Pour ajouter une langue, créez langs/xx.json en copiant en.json et en traduisant les valeurs.

Licence

GPL 3.0 — voir https://flatboard.org

Edited on Feb 22, 2026 By Fred .