updated migrations with foreign relations

This commit is contained in:
2025-03-15 20:12:59 +01:00
parent e653fbf5fa
commit fd09629a9f
2 changed files with 4 additions and 4 deletions
@@ -15,9 +15,9 @@ return new class extends Migration
$table->id(); $table->id();
$table->string('name')->required(); $table->string('name')->required();
$table->string('description')->nullable(); $table->string('description')->nullable();
$table->string('color_id')->required(); $table->foreignId('color_id')->constrained();
$table->string('manufacturer_id')->required(); $table->foreignId('manufacturer_id')->constrained();
$table->string('type_id')->required(); $table->foreignId('filament_type_id')->constrained();
$table->string('weight')->required(); $table->string('weight')->required();
$table->string('diameter')->required(); $table->string('diameter')->required();
$table->string('price')->nullable(); $table->string('price')->nullable();
@@ -15,7 +15,7 @@ return new class extends Migration
$table->id(); $table->id();
$table->string('name'); $table->string('name');
$table->string('description')->nullable(); $table->string('description')->nullable();
$table->string('manufacturer_id')->required(); $table->foreignId('manufacturer_id')->constrained();
$table->string('diameter')->required(); $table->string('diameter')->required();
$table->string('temp_max')->required(); $table->string('temp_max')->required();
$table->timestamps(); $table->timestamps();