opened
dennis-git
username_0
UNIQUE constraint should be added to roles and permissions tables in the migration like so:

        Schema::create($tableNames['permissions'], function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('guard_name');
            $table->timestamps();
            $table->unique(['name', 'guard_name']);
        });

        Schema::create($tableNames['roles'], function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('guard_name');
            $table->timestamps();
            $table->unique(['name', 'guard_name']);
        });

to prevent creating duplicate Roles and Permissions, which can break someone's code quite easily.
UNIQUE constraint should be added to roles and permissions tables in the migration
issue
created
drbyte
username_1
Ref: #1206
comment
closed
drbyte
username_1
issue