Total Complexity | 2 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class ChangeMorphKey extends Migration |
||
8 | { |
||
9 | public function up() |
||
10 | { |
||
11 | Schema::table('pages', function (Blueprint $table) { |
||
12 | $table->renameColumn('collection', 'morph_key'); |
||
13 | }); |
||
14 | |||
15 | Schema::table('modules', function (Blueprint $table) { |
||
16 | $table->renameColumn('collection', 'morph_key'); |
||
17 | }); |
||
18 | |||
19 | Schema::table('pages', function (Blueprint $table) { |
||
20 | $table->string('morph_key', 255)->change(); |
||
21 | }); |
||
22 | |||
23 | Schema::table('modules', function (Blueprint $table) { |
||
24 | $table->string('morph_key', 255)->change(); |
||
25 | }); |
||
26 | } |
||
27 | |||
28 | public function down() |
||
29 | { |
||
30 | Schema::dropIfExists('pagesets'); |
||
31 | } |
||
33 |