Fix validation error and bootstrap order of operations issue.
Some checks are pending
Run unit tests / run-unit-tests (push) Waiting to run

This commit is contained in:
Greg Sarjeant 2025-07-23 23:27:02 -04:00
parent f5123e5044
commit c7acca6bb3
3 changed files with 9 additions and 1 deletions

View File

@ -25,6 +25,10 @@ if (!(preg_match('/setup$/', $path))) {
// database validation
$dbMgr = new Database();
$dbMgr->validate();
// filesystem Migration
// TODO - delete
$fsMgr->migrate();
} catch (SetupException $e) {
$e->handle();
exit;

View File

@ -12,7 +12,7 @@ class SetupException extends Exception {
// Exceptions don't generally define their own handlers,
// but this is a very specific case.
public function handle(){
switch ($this->setupIssue()){
switch ($this->setupIssue){
case 'storage_missing':
case 'storage_permissions':
case 'directory_creation':

View File

@ -5,6 +5,10 @@ class Filesystem {
public function validate(): void{
$this->validateStorageDir();
$this->validateStorageSubdirs();
}
// TODO - delete this
public function migrate(): void{
$this->migrateTickFiles();
$this->moveTicksToDatabase();
}