combinacion nombre-barrio unica

This commit is contained in:
Alejandro Tasistro 2024-03-19 22:34:54 -03:00
parent 830002b4cf
commit 554015a616
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ public function up(): void
$table->unsignedBigInteger('barrio_id');
$table->timestamps();
$table->foreign('barrio_id')->references('id')->on('barrios');
$table->unique(['barrio_id','name']);
});
}