Hi, I've been stuck with this error 150 "Foreign key constraint is incorrectly formed"
though I have all the columns as the same type and length it won't work,
my migration files:
Schema::create('discord_useres', function (Blueprint $table) {
$table->id();
$table->string('usr_email',255);
$table->string('usr_id',255);
$table->string("dis_usr");
$table->string('dis_tag');
$table->enum('verfied',[true,false]);
$table->string('avatar');
$table->timestamps();
});
:
Schema::create('baskets', function (Blueprint $table) {
$table->id();
$table->string('usr_email',255);
$table->string('usr_id',255);
$table->timestamps();
$table->foreign('usr_email')->references('usr_email')->on('discord_useres');
$table->foreign('usr_id')->references('usr_id')->on('discord_useres');
});
as I said it just won't work and give me this annoying error.