mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 05:28:18 +01:00
Schedules should be soft deletable
This commit is contained in:
parent
ccb0a0c390
commit
43fefec37a
@ -18,6 +18,7 @@ use CachetHQ\Cachet\Presenters\SchedulePresenter;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use McCool\LaravelAutoPresenter\HasPresenter;
|
||||
|
||||
/**
|
||||
@ -27,7 +28,7 @@ use McCool\LaravelAutoPresenter\HasPresenter;
|
||||
*/
|
||||
class Schedule extends Model implements HasPresenter
|
||||
{
|
||||
use SearchableTrait, SortableTrait, ValidatingTrait;
|
||||
use SearchableTrait, SoftDeletes, SortableTrait, ValidatingTrait;
|
||||
|
||||
/**
|
||||
* The upcoming status.
|
||||
|
@ -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\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
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();
|
||||
});
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user