Files
portal-api/database/migrations/2024_01_31_155307_discount__customer.php
T
2025-07-24 16:18:27 +07:00

36 lines
804 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create('discount_customer',function (Blueprint $table) {
$table->bigInteger('discount_id')->default(0)->index();
$table->bigInteger('customer_id')->default(0)->index();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('discount_customer',function (Blueprint $table) {
$table->dropForeign(['discount_id','customer_id']);
$table->drop();
});
}
};