Skip to content

Commit 4fafcab

Browse files
author
ahmadhuss
committed
refactor: categories migration with the unique constraint
1 parent e596ab0 commit 4fafcab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

database/migrations/2021_05_25_081857_create_categories_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function up()
1515
{
1616
Schema::create('categories', function (Blueprint $table) {
1717
$table->id();
18-
$table->string('name');
18+
$table->string('name')->unique();
1919
$table->timestamps();
2020
});
2121
}

0 commit comments

Comments
 (0)