perf: 新增联系电话

This commit is contained in:
kuaifan
2022-07-08 15:24:24 +08:00
parent 97d041076d
commit c13f8bbcc0
9 changed files with 146 additions and 31 deletions
@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddUsersTel extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
if (!Schema::hasColumn('users', 'tel')) {
$table->string('tel', 50)->nullable()->default('')->after('email')->comment('联系电话');
}
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn("tel");
});
}
}