Skip to content

Commit

Permalink
Merge pull request #3076 from CachetHQ/soft-deletable-schedules
Browse files Browse the repository at this point in the history
Schedules should be soft deletable
  • Loading branch information
jbrooksuk committed Jun 14, 2018
2 parents ccb0a0c + 03dab36 commit 8cf68ac
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Models/Schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use McCool\LaravelAutoPresenter\HasPresenter;

/**
Expand All @@ -27,7 +28,7 @@
*/
class Schedule extends Model implements HasPresenter
{
use SearchableTrait, SortableTrait, ValidatingTrait;
use SearchableTrait, SoftDeletes, SortableTrait, ValidatingTrait;

/**
* The upcoming status.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlterSchedulesSoftDeletes extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('schedules', function (Blueprint $table) {
$table->softDeletes();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('schedules', function (Blueprint $table) {
$table->dropSoftDeletes();
});
}
}

0 comments on commit 8cf68ac

Please sign in to comment.