Skip to content

Commit

Permalink
add uuid in migration
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed Apr 6, 2023
1 parent 12853c8 commit 1fc09e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/laravel-attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/*
* Use uuid as primary key.
*/
'uuids' => false,
'uuids' => false, // Also in beta !!!
],

/*
Expand Down
6 changes: 5 additions & 1 deletion migrations/2022_08_04_155610_create_attributes_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ public function up()
$table->id();
$table->string('title');
$table->text('value');
$table->unsignedBigInteger('attributable_id');
if (config('laravel-attributes.tables.uuids', false)) {
$table->uuid('attributable_id');
} else {
$table->unsignedBigInteger('attributable_id');
}
$table->string('attributable');
$table->timestamps();
});
Expand Down

0 comments on commit 1fc09e2

Please sign in to comment.