diff --git a/cmd/core-app/env.go b/cmd/core-app/env.go index 5fbde0bf..6249285c 100644 --- a/cmd/core-app/env.go +++ b/cmd/core-app/env.go @@ -123,6 +123,7 @@ CACHE_STORE=file SESSION_DRIVER=file LOG_CHANNEL=single LOG_LEVEL=warning + `, appKey, env.DatabasePath) return os.WriteFile(filepath.Join(laravelRoot, ".env"), []byte(content), 0o644) diff --git a/cmd/core-app/laravel/app/Providers/AppServiceProvider.php b/cmd/core-app/laravel/app/Providers/AppServiceProvider.php new file mode 100644 index 00000000..e8f107ac --- /dev/null +++ b/cmd/core-app/laravel/app/Providers/AppServiceProvider.php @@ -0,0 +1,28 @@ + true, + '--no-interaction' => true, + ]); + } catch (Throwable) { + // Silently skip — DB might not exist yet (e.g. during + // composer operations or first extraction). + } + } +} diff --git a/cmd/core-app/laravel/bootstrap/app.php b/cmd/core-app/laravel/bootstrap/app.php index 66615824..ba8f1fff 100644 --- a/cmd/core-app/laravel/bootstrap/app.php +++ b/cmd/core-app/laravel/bootstrap/app.php @@ -9,6 +9,7 @@ use Illuminate\Foundation\Configuration\Middleware; return Application::configure(basePath: dirname(__DIR__)) ->withRouting( web: __DIR__.'/../routes/web.php', + commands: __DIR__.'/../routes/console.php', ) ->withMiddleware(function (Middleware $middleware) { // diff --git a/cmd/core-app/laravel/bootstrap/providers.php b/cmd/core-app/laravel/bootstrap/providers.php new file mode 100644 index 00000000..84c7d4de --- /dev/null +++ b/cmd/core-app/laravel/bootstrap/providers.php @@ -0,0 +1,7 @@ +string('id')->primary(); + $table->foreignId('user_id')->nullable()->index(); + $table->string('ip_address', 45)->nullable(); + $table->text('user_agent')->nullable(); + $table->longText('payload'); + $table->integer('last_activity')->index(); + }); + } + + public function down(): void + { + Schema::dropIfExists('sessions'); + } +}; diff --git a/cmd/core-app/laravel/database/migrations/0001_01_01_000001_create_cache_table.php b/cmd/core-app/laravel/database/migrations/0001_01_01_000001_create_cache_table.php new file mode 100644 index 00000000..266e00a9 --- /dev/null +++ b/cmd/core-app/laravel/database/migrations/0001_01_01_000001_create_cache_table.php @@ -0,0 +1,31 @@ +string('key')->primary(); + $table->mediumText('value'); + $table->integer('expiration'); + }); + + Schema::create('cache_locks', function (Blueprint $table) { + $table->string('key')->primary(); + $table->string('owner'); + $table->integer('expiration'); + }); + } + + public function down(): void + { + Schema::dropIfExists('cache_locks'); + Schema::dropIfExists('cache'); + } +};