优化代码
parent
01f36b5fa8
commit
dfac0fdcd7
|
@ -28,8 +28,6 @@ class CreateGroupTable extends Migration
|
||||||
$table->charset = 'utf8';
|
$table->charset = 'utf8';
|
||||||
$table->collation = 'utf8_general_ci';
|
$table->collation = 'utf8_general_ci';
|
||||||
$table->engine = 'InnoDB';
|
$table->engine = 'InnoDB';
|
||||||
|
|
||||||
$table->index(['group_id', 'is_delete', 'is_top', 'updated_at'], 'idx_group_id_is_delete_is_top_updated_at');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$prefix = config('databases.default.prefix');
|
$prefix = config('databases.default.prefix');
|
||||||
|
|
|
@ -12,7 +12,7 @@ class CreateGroupNoticeTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('users_group_notice', function (Blueprint $table) {
|
Schema::create('group_notice', function (Blueprint $table) {
|
||||||
$table->unsignedInteger('id', true)->comment('群公告ID');
|
$table->unsignedInteger('id', true)->comment('群公告ID');
|
||||||
$table->unsignedInteger('group_id')->default(0)->comment('群组ID');
|
$table->unsignedInteger('group_id')->default(0)->comment('群组ID');
|
||||||
$table->unsignedInteger('creator_id')->default(0)->comment('创建者用户ID');
|
$table->unsignedInteger('creator_id')->default(0)->comment('创建者用户ID');
|
||||||
|
|
Loading…
Reference in New Issue