2020_11_17_033808_alert_cmds_user.php 984 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class AlertCmdsUser extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::table('cdms_users',function (Blueprint $table){
  15. $table->addColumn('integer','docter_id')->comment('医生id')->nullable(true)->after('org_id');
  16. });
  17. Schema::table('cdms_roles',function (Blueprint $table){
  18. $table->addColumn('integer','org_id')->comment('医生id')->after('id');
  19. });
  20. }
  21. /**
  22. * Reverse the migrations.
  23. *
  24. * @return void
  25. */
  26. public function down()
  27. {
  28. Schema::table('cdms_users',function (Blueprint $table){
  29. $table->dropColumn('docter_id');
  30. });
  31. Schema::table('cdms_roles',function (Blueprint $table){
  32. $table->dropColumn('org_id');
  33. });
  34. }
  35. }