6
0
Fork 0

移除补货日志补唯一索引

release
李静 2022-02-15 11:32:52 +08:00
parent 9ea2f04ac2
commit 5a269d74e9
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class DelDealerUserIdOrderIdUniqueToDealerPurchaseLogsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('dealer_purchase_logs', function (Blueprint $table) {
$table->dropUnique(['user_id', 'order_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('dealer_purchase_logs', function (Blueprint $table) {
$table->unique(['user_id', 'order_id']);
});
}
}