This commit is contained in:
Bozhidar 2024-04-25 16:49:19 +03:00
parent 8604b715c1
commit a5e691d0da
3 changed files with 65 additions and 1 deletions

View file

@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class HostingSubscriptionBackup extends Model
{
use HasFactory;
}

View file

@ -13,7 +13,7 @@ return new class extends Migration
{
Schema::create('backups', function (Blueprint $table) {
$table->id();
$table->bigInteger('hosting_subscription_id')->nullable();
$table->string('backup_type')->nullable();
$table->string('status')->nullable();
$table->string('path')->nullable();

View file

@ -0,0 +1,53 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('hosting_subscription_backups', function (Blueprint $table) {
$table->id();
$table->bigInteger('hosting_subscription_id')->nullable();
$table->string('backup_type')->nullable();
$table->string('status')->nullable();
$table->string('path')->nullable();
$table->string('filepath')->nullable();
$table->string('size')->nullable();
$table->string('disk')->nullable();
$table->string('process_id')->nullable();
$table->longText('settings')->nullable();
$table->tinyInteger('queued')->nullable();
$table->timestamp('queued_at')->nullable();
$table->tinyInteger('started')->nullable();
$table->timestamp('started_at')->nullable();
$table->tinyInteger('completed')->nullable();
$table->timestamp('completed_at')->nullable();
$table->tinyInteger('failed')->nullable();
$table->timestamp('failed_at')->nullable();
$table->tinyInteger('cancelled')->nullable();
$table->timestamp('cancelled_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('hosting_subscription_backups');
}
};