Skip to content

Commit

Permalink
Merge pull request #195 from dbarzin/dev
Browse files Browse the repository at this point in the history
fix pograsql miration
  • Loading branch information
dbarzin authored Oct 18, 2024
2 parents f91487b + 14b1984 commit 7c6829c
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ public function up(): void
$control->measures()->sync([$control->measure_id]);
}

Schema::table('controls', function (Blueprint $table) {
$table->dropForeign(['controls_domain_id_foreign']);
$table->dropForeign(['controls_measure_id_foreign']);
});
if (DB::getDriverName() !== 'pgsql')
Schema::table('controls', function (Blueprint $table) {
$table->dropForeign(['controls_domain_id_foreign']);
$table->dropForeign(['controls_measure_id_foreign']);
});

if (DB::getDriverName() === 'sqlite')
// Could not drop column with sqlite
Expand Down

0 comments on commit 7c6829c

Please sign in to comment.