mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 17:26:06 +01:00
10 lines
243 B
Ruby
10 lines
243 B
Ruby
|
|
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
|
||
|
|
end
|
||
|
|
|
||
|
|
def self.down
|
||
|
|
# no-op
|
||
|
|
end
|
||
|
|
end
|