| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class AddMinCode extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- //添加字段
- if (Schema::hasTable('yz_business_card')) {
- if (!Schema::hasColumn('yz_business_card', 'min_code')) {
- Schema::table('yz_business_card', function (Blueprint $table) {
- $table->string('min_code')->nullable()->comment('小程序名片二维码');
- });
- }
- }
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- //
- }
- }
|