mirror of
https://gitee.com/ctexthuang/hyperf-micro-svc.git
synced 2026-02-08 10:20:16 +08:00
first commit
This commit is contained in:
35
migrations/2025_09_11_175013_create_admin_role_table.php
Normal file
35
migrations/2025_09_11_175013_create_admin_role_table.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Hyperf\Database\Schema\Schema;
|
||||
use Hyperf\Database\Schema\Blueprint;
|
||||
use Hyperf\Database\Migrations\Migration;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('admin_role', function (Blueprint $table) {
|
||||
$table->comment('后台角色信息表');
|
||||
$table->bigIncrements('id')->comment('主键');
|
||||
$table->string('name', 30)->comment('角色名称');
|
||||
$table->string('code', 100)->comment('角色代码')->unique();
|
||||
$table->tinyInteger('status')->comment('状态:1=正常,2=停用')->default(1);
|
||||
$table->smallInteger('sort')->comment('排序')->default(0);
|
||||
$table->unsignedBigInteger('created_by')->default(0)->comment('创建人ID');
|
||||
$table->unsignedBigInteger('updated_by')->default(0)->comment('更新人ID');
|
||||
$table->datetimes();
|
||||
$table->string('remark')->comment('备注')->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('admin_role');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user