| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- use App\Commodity;
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class ChangeCommoditiesTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * 修改commodities表
- *
- * @return void
- */
- public function up()
- {
- Schema::table('commodities',function (Blueprint $table){
- $table->bigInteger('owner_id')->after('owner_name')->nullable()->comment('外键货主');
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::table('commodities',function (Blueprint $table){
- $table->string('owner_name')->after('owner_id')->nullable()->comment('外键货主');
- });
- }
- }
|