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 // database validation
$dbMgr = new Database(); $dbMgr = new Database();
$dbMgr->validate(); $dbMgr->validate();
// filesystem Migration
// TODO - delete
$fsMgr->migrate();
} catch (SetupException $e) { } catch (SetupException $e) {
$e->handle(); $e->handle();
exit; exit;

View File

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

View File

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