up()
up()
Run the migrations.
<?php
/**
* JingYao-backend
*
* @link https://gitee.com/wang-zhihui-release/jingyao-backend
* @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
*/
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AlterTableCompanyAddColumns extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::table('companies', function (Blueprint $table) {
$table->string('liaison_man')->nullable()->comment('公司联系人');
$table->string('liaison_phone')->nullable()->comment('公司联系人电话');
$table->string('legal_person_id_card_number')->default(0)->comment('法人 身份证号');
$table->string('legal_person_name')->default(0)->comment('法人姓名');
$table->string('company_phone')->nullable()->comment('公司电话');
$table->string('company_email')->nullable()->comment('公司邮箱');
$table->string('social_credit_code')->nullable()->comment('统一社会信用代码');
$table->string('address')->nullable()->comment('公司地址');
$table->string('registered_capital')->default(0)->comment('注册资本');
$table->string('set_up_date')->nullable()->comment('成立日期');
$table->integer('people_number')->default(0)->comment('公司人数');
$table->string('range')->nullable()->comment('经营范围');
$table->string('business_license')->nullable()->comment('营业执照');
$table->tinyInteger('check_status')->default(0);
$table->string('check_message')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::table('companies', function (Blueprint $table) {
$table->dropColumn('liaison_man');
$table->dropColumn('liaison_phone');
$table->dropColumn('legal_person_id_card_number');
$table->dropColumn('legal_person_name');
$table->dropColumn('company_phone');
$table->dropColumn('company_email');
$table->dropColumn('social_credit_code');
$table->dropColumn('address');
$table->dropColumn('registered_capital');
$table->dropColumn('set_up_date');
$table->dropColumn('people_number');
$table->dropColumn('range');
$table->dropColumn('business_license');
});
}
}