fix: wrong foreign key name

This commit is contained in:
Phan An 2022-08-01 12:48:27 +02:00
parent c4cffcc2e7
commit 964e1df26f
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC

View file

@ -29,7 +29,7 @@ return new class extends Migration
$table->string('song_id', 36)->change();
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('playlist_song_song_id_foreign');
$table->dropForeign('interactions_song_id_foreign');
}
$table->foreign('song_id')->references('id')->on('songs')->cascadeOnDelete()->cascadeOnUpdate();