2020_08_21_145711_create_user_group_table.php 630 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateUserGroupTable extends Migration {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up() {
  12. Schema::create('user_group', function(Blueprint $table) {
  13. $table->increments('id');
  14. $table->string('name')->comment('分组名称');
  15. $table->json('nodes')->nullable()->comment('关联的节点ID,多个用,号分隔');
  16. });
  17. }
  18. /**
  19. * Reverse the migrations.
  20. *
  21. * @return void
  22. */
  23. public function down() {
  24. Schema::dropIfExists('user_group');
  25. }
  26. }