refactor(website): update relationships and migration to use 'website_type_code' instead of 'website_type'

This commit is contained in:
2026-07-29 15:03:31 -03:00
parent b9ad2e589f
commit 9e3163b74f
4 changed files with 9 additions and 7 deletions

View File

@@ -27,8 +27,10 @@ return new class extends Migration
Schema::create('website_type_extras', function (Blueprint $table): void {
$table->id();
$table->foreignId('website_type')
->constrained('website_type')
$table->string('website_type_code');
$table->foreign('website_type_code')
->references('codigo')
->on('website_type')
->cascadeOnUpdate()
->cascadeOnDelete();
$table->string('nombre');