2020_10_14_023006_alter_docters_table.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class AlterDoctersTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::table('docters', function (Blueprint $table) {
  15. //添加字段
  16. $table->integer('user_id')->comment('用户表关联id');
  17. $table->string('password',50)->nullable()->comment('密码');
  18. $table->integer('is_then')->nullable()->comment('是否认证:0=未认证;1=认证');
  19. $table->string('practice',200)->nullable()->comment('医生照片和执业证书,号分开');
  20. $table->string('card_photo',200)->nullable()->comment('身份证正反面,号分开');
  21. $table->string('is_quail',200)->nullable()->comment('照片和资格证书,号分开');
  22. $table->integer('card_id',20)->nullable()->comment('身份证号');
  23. });
  24. }
  25. /**
  26. * Reverse the migrations.
  27. *
  28. * @return void
  29. */
  30. public function down()
  31. {
  32. Schema::table('docters', function (Blueprint $table) {
  33. //删除字段
  34. $table->dropColumn('user_id');
  35. });
  36. }
  37. }