diff options
-rw-r--r-- | db/migrate/20220224194639_delete_orphaned_time_entry_activities.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20220224194639_delete_orphaned_time_entry_activities.rb b/db/migrate/20220224194639_delete_orphaned_time_entry_activities.rb index 899fc5892..887b7bcab 100644 --- a/db/migrate/20220224194639_delete_orphaned_time_entry_activities.rb +++ b/db/migrate/20220224194639_delete_orphaned_time_entry_activities.rb @@ -1,6 +1,6 @@ class DeleteOrphanedTimeEntryActivities < ActiveRecord::Migration[6.1] def self.up - TimeEntryActivity.left_outer_joins(:project).where(projects: {id: nil}).where.not(project_id: nil).delete_all + TimeEntryActivity.where.missing(:project).where.not(project_id: nil).delete_all end def self.down |