Skip to content

Commit

Permalink
Merge pull request #14 from Althinect:refactor/group-column-refactor
Browse files Browse the repository at this point in the history
feat: Add 'group' column to permissions table with indexing
  • Loading branch information
tharindarodrigo authored Jan 2, 2025
2 parents 4301241 + d8f6642 commit e30b821
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion database/migrations/add_group_column_to_permissions_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@
public function up()
{
Schema::table('permissions', function (Blueprint $table) {
$table->string('group')->nullable();
$table->string('group')->after('guard_name')->nullable();
$table->index('group');
});
}

public function down()
{
Schema::table('permissions', function (Blueprint $table) {
$table->dropIndex('permissions_group_index');
$table->dropColumn('group');
});
}
};

0 comments on commit e30b821

Please sign in to comment.