Enable scheduled ClickHouse backups across the job, API, and UI, and guard unsupported database types via isBackupSolutionAvailable(). Convert Stripe subscription sync from a job to an action with clearer discrepancy resolution, and add cloud:export-users plus cloud:cleanup-unverified-users with tests.
39 lines
1.3 KiB
PHP
39 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Livewire\Project\Database\Backup;
|
|
|
|
use Livewire\Component;
|
|
|
|
class Index extends Component
|
|
{
|
|
public $database;
|
|
|
|
public function mount()
|
|
{
|
|
$project = currentTeam()->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first();
|
|
if (! $project) {
|
|
return redirect()->route('dashboard');
|
|
}
|
|
$environment = $project->load(['environments'])->environments->where('uuid', request()->route('environment_uuid'))->first()->load(['applications']);
|
|
if (! $environment) {
|
|
return redirect()->route('dashboard');
|
|
}
|
|
$database = $environment->databases()->where('uuid', request()->route('database_uuid'))->first();
|
|
if (! $database) {
|
|
return redirect()->route('dashboard');
|
|
}
|
|
if (! $database->isBackupSolutionAvailable()) {
|
|
return redirect()->route('project.database.configuration', [
|
|
'project_uuid' => $project->uuid,
|
|
'environment_uuid' => $environment->uuid,
|
|
'database_uuid' => $database->uuid,
|
|
]);
|
|
}
|
|
$this->database = $database;
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.project.database.backup.index');
|
|
}
|
|
}
|