Open latif-developers-studio opened 2 years ago
Same error
getting same error by implementing unique check on any db column
Same error
@sts-ryan-holton, @workOfDsYasir
Yes, there is a constraint by MySQL end. If you are going to apply a database partition then you are unable to add the unique index.
How did you resolve it? It seems the docs: $table->primary(['id','date']);
doesn't work
How did you resolve it? It seems the docs:
$table->primary(['id','date']);
doesn't work
You have to create composite key rather than primary key
and to create composite key $table->primary(['id','date']);
this is the way.
This isn't working lol/
If I add any unique constraint then
General error: 1503 A UNIQUE INDEX must include all columns in the table's partitioning function
I got this error.
Here is my migration
Schema::create('cp_transactions', function (Blueprint $table) {
Can you please help me to resolve this issue?