Fix @mutex decorator, text input, modal docs, group management polish
Add user groups feature, simplify flash alerts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -341,6 +341,11 @@
|
||||
"created_at": "2025-12-11T05:06:10+00:00",
|
||||
"created_by": "root",
|
||||
"command": "php artisan make:migration:safe create_login_history_table"
|
||||
},
|
||||
"2025_12_11_061551_create_groups_and_group_users_tables.php": {
|
||||
"created_at": "2025-12-11T06:15:51+00:00",
|
||||
"created_by": "root",
|
||||
"command": "php artisan make:migration:safe create_groups_and_group_users_tables"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
// Create user_groups table
|
||||
DB::statement("
|
||||
CREATE TABLE user_groups (
|
||||
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
site_id BIGINT NOT NULL,
|
||||
name VARCHAR(100) NOT NULL,
|
||||
description TEXT NULL,
|
||||
deletion_protection TINYINT(1) NOT NULL DEFAULT 0,
|
||||
deleted_at TIMESTAMP(3) NULL,
|
||||
deleted_by BIGINT NULL,
|
||||
created_at TIMESTAMP(3) NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
updated_at TIMESTAMP(3) NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
|
||||
created_by BIGINT NULL,
|
||||
updated_by BIGINT NULL,
|
||||
|
||||
INDEX user_groups_site_id_idx (site_id),
|
||||
INDEX user_groups_name_idx (name),
|
||||
INDEX user_groups_deleted_at_idx (deleted_at)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
");
|
||||
|
||||
// Create user_group_members pivot table (many-to-many)
|
||||
DB::statement("
|
||||
CREATE TABLE user_group_members (
|
||||
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
user_group_id BIGINT NOT NULL,
|
||||
user_id BIGINT NOT NULL,
|
||||
created_at TIMESTAMP(3) NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
updated_at TIMESTAMP(3) NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
|
||||
created_by BIGINT NULL,
|
||||
updated_by BIGINT NULL,
|
||||
|
||||
INDEX user_group_members_group_id_idx (user_group_id),
|
||||
INDEX user_group_members_user_id_idx (user_id),
|
||||
UNIQUE INDEX user_group_members_unique (user_group_id, user_id),
|
||||
CONSTRAINT user_group_members_group_fk FOREIGN KEY (user_group_id) REFERENCES user_groups(id) ON DELETE CASCADE,
|
||||
CONSTRAINT user_group_members_user_fk FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
");
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user