| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class ChangeWarehousesTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::table('warehouses', function (Blueprint $table) {
- $table->addColumn('bigInteger','province_id')->nullable();
- $table->addColumn('bigInteger','city_id')->nullable();
- $table->addColumn('bigInteger','county_id')->nullable();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::table('warehouses', function (Blueprint $table) {
- $table->dropColumn('province_id');
- $table->dropColumn('city_id');
- $table->dropColumn('county_id');
- });
- }
- }
|