| @@ 6-32 (lines=27) @@ | ||
| 3 | use Illuminate\Database\Migrations\Migration; |
|
| 4 | use Illuminate\Database\Schema\Blueprint; |
|
| 5 | ||
| 6 | class AddRootColumnToMenusTable extends Migration |
|
| 7 | { |
|
| 8 | /** |
|
| 9 | * Run the migrations. |
|
| 10 | * |
|
| 11 | * @return void |
|
| 12 | */ |
|
| 13 | public function up() |
|
| 14 | { |
|
| 15 | Schema::table('menu__menuitems', function (Blueprint $table) { |
|
| 16 | $table->engine = 'InnoDB'; |
|
| 17 | $table->boolean('is_root')->default(0); |
|
| 18 | }); |
|
| 19 | } |
|
| 20 | ||
| 21 | /** |
|
| 22 | * Reverse the migrations. |
|
| 23 | * |
|
| 24 | * @return void |
|
| 25 | */ |
|
| 26 | public function down() |
|
| 27 | { |
|
| 28 | Schema::table('menu__menuitems', function (Blueprint $table) { |
|
| 29 | $table->dropColumn('is_root'); |
|
| 30 | }); |
|
| 31 | } |
|
| 32 | } |
|
| 33 | ||
| @@ 6-32 (lines=27) @@ | ||
| 3 | use Illuminate\Database\Migrations\Migration; |
|
| 4 | use Illuminate\Database\Schema\Blueprint; |
|
| 5 | ||
| 6 | class AddIconColumnToMenuitemsTable extends Migration |
|
| 7 | { |
|
| 8 | /** |
|
| 9 | * Run the migrations. |
|
| 10 | * |
|
| 11 | * @return void |
|
| 12 | */ |
|
| 13 | public function up() |
|
| 14 | { |
|
| 15 | Schema::table('menu__menuitems', function (Blueprint $table) { |
|
| 16 | $table->engine = 'InnoDB'; |
|
| 17 | $table->string('icon')->default(''); |
|
| 18 | }); |
|
| 19 | } |
|
| 20 | ||
| 21 | /** |
|
| 22 | * Reverse the migrations. |
|
| 23 | * |
|
| 24 | * @return void |
|
| 25 | */ |
|
| 26 | public function down() |
|
| 27 | { |
|
| 28 | Schema::table('menu__menuitems', function (Blueprint $table) { |
|
| 29 | $table->dropColumn('icon'); |
|
| 30 | }); |
|
| 31 | } |
|
| 32 | } |
|
| 33 | ||