Skip to content

Commit

Permalink
fix: primary key for uuids
Browse files Browse the repository at this point in the history
  • Loading branch information
halivert committed Jul 13, 2023
1 parent 8c26eea commit 9c9d39a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->uuid('id');
$table->uuid('id')->primary();
$table->string('name');
$table->string('username')->unique();
$table->string('email')->unique();
Expand Down
Expand Up @@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('credit_cards', function (Blueprint $table) {
$table->uuid('id');
$table->uuid('id')->primary();
$table->foreignUuid('user_id')->constrained();
$table->string('name');
$table->integer('due_date');
Expand Down
Expand Up @@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('transactions', function (Blueprint $table) {
$table->uuid('id');
$table->uuid('id')->primary();
$table->foreignUuid('credit_card_id')->constrained();
$table->string('concept');
$table->dateTime('datetime');
Expand Down

0 comments on commit 9c9d39a

Please sign in to comment.