AddDeletedAtToVersions   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 6 1
A down() 0 6 1
1
<?php
2
/**
3
 * No Namespace
4
 *
5
 * This file is part of the overtrue/laravel-versionable.
6
 * ------------------------------------------------------
7
 * (c) overtrue <[email protected]>
8
 * This source file is subject to the MIT license that is bundled.
9
 */
10
11
use Illuminate\Database\Migrations\Migration;
12
use Illuminate\Database\Schema\Blueprint;
13
use Illuminate\Support\Facades\Schema;
14
15
/**
16
 * Class AddDeletedAtToVersions
17
 * @author 安正超 - overtrue
18
 * @github https://github.com/overtrue
19
 */
20
class AddDeletedAtToVersions extends Migration
21
{
22
    /**
23
     * Run the migrations.
24
     *
25
     * @return void
26
     */
27
    public function up(): void
28
    {
29
        Schema::table('versions', static function (Blueprint $table) {
30
            $table->softDeletes();
31
        });
32
    }
33
34
    /**
35
     * Reverse the migrations.
36
     *
37
     * @return void
38
     */
39
    public function down(): void
40
    {
41
        Schema::table('versions', static function (Blueprint $table) {
42
            $table->dropSoftDeletes();
43
        });
44
    }
45
}
46