make no_art unique in food_product table

This commit is contained in:
Olivier Legat 2021-04-26 16:14:44 +02:00
parent 31fac4d941
commit b81bf585a4

View file

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class MakeUniqueNoArtInfFoodProductsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//44509
Schema::table('food_products', function (Blueprint $table) {
$table->unique('no_art');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
Schema::table('food_products', function (Blueprint $table) {
});
}
}