6
0
Fork 0

移除管理津贴唯一索引

release
李静 2022-02-15 11:38:00 +08:00
parent 5a269d74e9
commit 85524f5079
2 changed files with 32 additions and 32 deletions

View File

@ -1,32 +0,0 @@
<?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']);
});
}
}

View File

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