1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- return new class extends Migration {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('user', function (Blueprint $table) {
- $table->id();
- $table->string("phone")->default("");
- $table->string("password")->default("");
- $table->string("email")->default("");
- $table->unsignedTinyInteger("status")->default(0)->comment("0 禁用 1启用");
- $table->unsignedInteger("group_id")->default(0);
- $table->string("extra",2000)->default("")->comment("糊屎字段");
- $table->timestamps();
- });
- Schema::create('admin_group', function (Blueprint $table) {
- $table->id();
- $table->string("name")->default("");
- $table->timestamps();
- });
- Schema::create('admin_permission', function (Blueprint $table) {
- $table->id();
- $table->string("name")->default("");
- $table->string("code")->default("");
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('user');
- Schema::dropIfExists('admin_group');
- Schema::dropIfExists('admin_permission');
- }
- };
|