[Backport release-24.05] flarum: fix installation and migration logic (#342226)

This commit is contained in:
kirillrdy
2024-09-16 19:14:12 +10:00
committed by GitHub

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
'';
};
};