combinacion nombre-barrio unica
This commit is contained in:
parent
830002b4cf
commit
554015a616
|
@ -18,6 +18,7 @@ public function up(): void
|
||||||
$table->unsignedBigInteger('barrio_id');
|
$table->unsignedBigInteger('barrio_id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->foreign('barrio_id')->references('id')->on('barrios');
|
$table->foreign('barrio_id')->references('id')->on('barrios');
|
||||||
|
$table->unique(['barrio_id','name']);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue