combinacion nombre-barrio unica
This commit is contained in:
parent
830002b4cf
commit
554015a616
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ return new class extends Migration
|
|||
$table->unsignedBigInteger('barrio_id');
|
||||
$table->timestamps();
|
||||
$table->foreign('barrio_id')->references('id')->on('barrios');
|
||||
$table->unique(['barrio_id','name']);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue