Skip to content

Commit

Permalink
fix: use table names from config file (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
IsraelOrtuno authored Jan 4, 2025
1 parent fc7a2ad commit 90546e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

declare(strict_types=1);

use Cog\Laravel\Love\Reactant\Models\Reactant;
use Cog\Laravel\Love\Reactant\ReactionCounter\Models\ReactionCounter;
use Cog\Laravel\Love\ReactionType\Models\ReactionType;
use Cog\Laravel\Love\Support\Database\Migration;
use Illuminate\Database\Schema\Blueprint;

Expand All @@ -38,12 +40,12 @@ public function up(): void
$table
->foreign('reactant_id')
->references('id')
->on('love_reactants')
->on((new Reactant())->getTable())
->onDelete('cascade');
$table
->foreign('reaction_type_id')
->references('id')
->on('love_reaction_types')
->on((new ReactionType())->getTable())
->onDelete('cascade');
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

declare(strict_types=1);

use Cog\Laravel\Love\Reactant\Models\Reactant;
use Cog\Laravel\Love\Reactant\ReactionTotal\Models\ReactionTotal;
use Cog\Laravel\Love\Support\Database\Migration;
use Illuminate\Database\Schema\Blueprint;
Expand All @@ -32,7 +33,7 @@ public function up(): void
$table
->foreign('reactant_id')
->references('id')
->on('love_reactants')
->on((new Reactant())->getTable())
->onDelete('cascade');
});
}
Expand Down

0 comments on commit 90546e8

Please sign in to comment.