mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
feat(backup): mark existing backups as legacy
This commit is contained in:
parent
3b68914b73
commit
307ea4d8d8
2 changed files with 23 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ class ScheduledDatabaseBackupExecution extends BaseModel
|
||||||
's3_uploaded' => 'boolean',
|
's3_uploaded' => 'boolean',
|
||||||
'local_storage_deleted' => 'boolean',
|
'local_storage_deleted' => 'boolean',
|
||||||
's3_storage_deleted' => 'boolean',
|
's3_storage_deleted' => 'boolean',
|
||||||
|
'legacy' => 'boolean',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('scheduled_database_backup_executions', function (Blueprint $table) {
|
||||||
|
$table->boolean('legacy')->default(false)->after('filename');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Mark all existing backup executions as legacy
|
||||||
|
DB::table('scheduled_database_backup_executions')->update(['legacy' => true]);
|
||||||
|
|
||||||
|
// @todo: In a future update or v5 we no longer need "databases_to_backup", "dump_all" in "scheduled_database_backups" - keeping them for now if we need to rollback.
|
||||||
|
// @todo: In a future update or v5 we no longer need "database_name" from "scheduled_database_backup_executions" - keeping them for now if we need to rollback.
|
||||||
|
}
|
||||||
|
};
|
||||||
Loading…
Reference in a new issue