updated migrations with foreign relations
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user