Include ID in Supplier Account Sync and add supplier id integrity constraint
This commit is contained in:
parent
f5d535daa7
commit
70571cb6ac
@ -60,7 +60,7 @@ class SupplierAccountSync extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$this->error(sprintf('User doesnt exist with email (%s)',$customer->email));
|
$this->error(sprintf('User doesnt exist with email (%s:%s)',$customer->id,$customer->email));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
<?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::table('supplier_user', function (Blueprint $table) {
|
||||||
|
$table->unique(['supplier_id','id']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('supplier_user', function (Blueprint $table) {
|
||||||
|
$table->dropUnique(['supplier_id','id']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user