| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class ChangeStoragesTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::dropIfExists('storages');
- Schema::create('storages', function (Blueprint $table) {
- $table->id();
- $table->bigInteger("station_id")->index()->comment("外键库位");
- $table->bigInteger("material_box_id")->nullable()->index()->comment("外键料箱");
- $table->bigInteger("commodity_id")->nullable()->index()->comment("外键商品");
- $table->integer("amount")->default(0)->comment("数量");
- $table->tinyInteger("status")->default(0)->comment("状态");
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('storages');
- Schema::create('storages', function (Blueprint $table) {
- $table->id();
- $table->bigInteger("material_box_id")->index()->comment("外键料箱");
- $table->bigInteger("commodity_id")->nullable()->index()->comment("外键商品");
- $table->integer("amount")->default(0)->comment("数量");
- $table->timestamps();
- });
- }
- }
|