Add support for locking backups to prevent any accidental deletions

This commit is contained in:
Dane Everitt 2021-05-03 21:26:09 -07:00
parent 5f48712c28
commit 5d5e4ca7b1
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
18 changed files with 250 additions and 88 deletions

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddSupportForLockingABackup extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('backups', function (Blueprint $table) {
$table->unsignedTinyInteger('is_locked')->after('is_successful')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('backups', function (Blueprint $table) {
$table->dropColumn('is_locked');
});
}
}