flarum: fix installation and migration logic

This commit is contained in:
Florian Agbuya
2024-09-12 16:14:41 +08:00
parent 413a052d9d
commit 317a52a757
+6 -3
View File
@@ -203,10 +203,13 @@ in {
ln -sf ${cfg.package}/share/php/flarum/public/index.php public/
'' + optionalString (cfg.createDatabaseLocally && cfg.database.driver == "mysql") ''
if [ ! -f config.php ]; then
php flarum install --file=${flarumInstallConfig}
php flarum install --file=${flarumInstallConfig}
fi
'' + ''
if [ -f config.php ]; then
php flarum migrate
php flarum cache:clear
fi
php flarum migrate
php flarum cache:clear
'';
};
};