database backups

This commit is contained in:
Saeed Vaziry
2023-08-25 21:05:18 +02:00
parent f9ac454a7c
commit ea3f011f34
55 changed files with 1111 additions and 172 deletions

View File

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void
{
Schema::table('storage_providers', function (Blueprint $table) {
$table->dropColumn('token');
$table->dropColumn('refresh_token');
$table->dropColumn('token_expires_at');
$table->dropColumn('label');
$table->dropColumn('connected');
$table->unsignedBigInteger('user_id')->after('id');
$table->string('profile')->after('user_id');
$table->longText('credentials')->nullable()->after('provider');
});
}
public function down(): void
{
Schema::table('storage_providers', function (Blueprint $table) {
$table->string('token');
$table->string('refresh_token');
$table->string('token_expires_at');
$table->string('label');
$table->dropColumn('user_id');
$table->dropColumn('profile');
$table->dropColumn('credentials');
});
}
};

View File

@ -0,0 +1,21 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void
{
Schema::table('backups', function (Blueprint $table) {
$table->dropColumn('name');
});
}
public function down(): void
{
Schema::table('backups', function (Blueprint $table) {
$table->string('name')->nullable();
});
}
};

View File

@ -0,0 +1,21 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void
{
Schema::table('backup_files', function (Blueprint $table) {
$table->string('restored_to')->after('status')->nullable();
});
}
public function down(): void
{
Schema::table('backup_files', function (Blueprint $table) {
$table->dropColumn('restored_to');
});
}
};