I'm doing migrations for the DB of the enterprise I work for.
The issue is that the same table has 4 primary keys but this error is being throw by Laravel.
This is how my migrations look like:
Schema::create('ventas', function (Blueprint $table) {
$table->bigIncrements('id');
$table->integer('empresa_id')->primary();
$table->integer('moneda_id')->primary();
$table->integer('user_id')->primary();
$table->foreign('empresa_id')->references('id')->on('empresas')->onDelete('restrict');
$table->foreign('moneda_id')->references('id')->on('monedas')->onDelete('restrict');
How can I solve this?
Thanks!