Explorar el Código

Fix author pointer on books

axkuhta hace 1 año
padre
commit
7b72a3b39e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      database/migrations/2023_11_02_093534_create_books_table.php

+ 1 - 1
database/migrations/2023_11_02_093534_create_books_table.php

@@ -18,7 +18,7 @@ return new class extends Migration
             $table->string("isbn")->nullable();
             $table->year("year")->nullable();
             $table->smallInteger("pagecount")->unsigned()->nullable();
-            $table->foreignId("authors");
+            $table->foreignId("author_id")->constrained();
             $table->timestamps();
         });
     }