YalcinSahin
Merhaba,
Hatayı çözdüm. Yardımcı olması açısından sizlerle de paylaşıyorum.
` Schema::create('customers_integration_category_attributes_values_marketplace', function (Blueprint $table) {
$table->id();
$table->bigInteger('attributeID')->unsigned();
$table->foreign('attributeID', 'marketplace_category_attributes_id_foreign')
->references('id')
->on('customers_integration_category_attributes_marketplace')
->cascadeOnDelete()
->cascadeOnUpdate();
$table->uuid('pAttributeValueID');
$table->unique('pAttributeValueID', 'pAttributeValueID_foreign');
$table->string('pAttributeValue');
$table->timestamps();
});`
Diğer tabloda primary key eğer id tuttuysanız değerleri aynı olması lazım. Yoksa hata veriyor.
Misal
$table->integer('attributeID')->unsigned();
bu şekilde bir kullanım hata verir.
Ayrıca uzun bir tabloda unique değer vermek de sıkıntılı.
O da şu şekilde çözüldü:
$table->uuid('pAttributeValueID');
$table->unique('pAttributeValueID', 'pAttributeValueID_foreign');
Yukarıdaki gibi kullanım doğru olacaktır. Bunla ilgili düzgün bir kaynak bulamadım. Umarım bu forumda iyi bir kaynak olur.