Total Complexity | 2 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class CreateTestModelTable extends Migration |
||
11 | { |
||
12 | public function up() |
||
13 | { |
||
14 | DB::transaction(function () { |
||
15 | Schema::create('test_models', function (Blueprint $table) { |
||
16 | $table->increments('id'); |
||
17 | |||
18 | $table->string('name'); |
||
19 | $table->string('some_field'); |
||
20 | $table->float('version')->default(0.0); |
||
21 | }); |
||
22 | |||
23 | Schema::create('soft_test_models', function (Blueprint $table) { |
||
24 | $table->increments('id'); |
||
25 | $table->softDeletes(); |
||
26 | |||
27 | $table->string('name'); |
||
28 | }); |
||
29 | }); |
||
30 | } |
||
31 | |||
32 | public function down() |
||
33 | { |
||
34 | DB::transaction(function () { |
||
35 | Schema::drop('test_models'); |
||
36 | Schema::drop('soft_test_models'); |
||
37 | }); |
||
40 |