讨论数量:
{
//平台用户表
Schema::create('admin_user', function (Blueprint $table) {
$table->increments('admin_id');
$table->string('username',32)->comment('用户名');
$table->string('password',255)->comment('密码');
$table->string('email',32)->default('')->comment('邮箱');
$table->integer('phone')->default('')->comment('手机');
$table->string('desc',100)->default('')->comment('描述');
$table->timestamps();
});
DB::statement("ALTER TABLE `admin_user` comment'平台:用户表'"); // 表注释
}
@overtrue 超哥,好像真的不能添加表comments哦,https://github.com/5-say/laravel-schema-extend太老了,laravel5.28装不下,有什么办法吗
{
//平台用户表
Schema::create('admin_user', function (Blueprint $table) {
$table->increments('admin_id');
$table->string('username',32)->comment('用户名');
$table->string('password',255)->comment('密码');
$table->string('email',32)->default('')->comment('邮箱');
$table->integer('phone')->default('')->comment('手机');
$table->string('desc',100)->default('')->comment('描述');
$table->timestamps();
});
DB::statement("ALTER TABLE `admin_user` comment'平台:用户表'"); // 表注释
}
推荐文章: