Merge branch 'develop' into feature/server-transfers-actually

This commit is contained in:
Matthew Penner 2020-04-04 16:28:02 -06:00 committed by GitHub
commit fd4de9168a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 1000 additions and 37 deletions

View file

@ -0,0 +1,43 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBackupsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('backups', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('server_id');
$table->char('uuid', 36);
$table->string('name');
$table->text('ignored_files');
$table->string('disk');
$table->string('sha256_hash')->nullable();
$table->integer('bytes')->default(0);
$table->timestamp('completed_at')->nullable();
$table->timestamps();
$table->softDeletes();
$table->unique('uuid');
$table->foreign('server_id')->references('id')->on('servers')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('backups');
}
}