| Total Complexity | 6 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class ChangeLocaleColumnInTwillFileables extends Migration |
||
| 7 | { |
||
| 8 | public function up() |
||
| 9 | { |
||
| 10 | if (Schema::hasTable('fileables') && Schema::hasColumn('fileables', 'locale')) { |
||
| 11 | Schema::table('fileables', function (Blueprint $table) { |
||
| 12 | $table->string('locale', 7)->change(); |
||
| 13 | }); |
||
| 14 | } |
||
| 15 | } |
||
| 16 | |||
| 17 | public function down() |
||
| 18 | { |
||
| 19 | if (Schema::hasTable('fileables') && Schema::hasColumn('fileables', 'locale')) { |
||
| 20 | Schema::table('fileables', function (Blueprint $table) { |
||
| 21 | $table->string('locale', 6)->change(); |
||
| 22 | }); |
||
| 26 |