spegling av
https://github.com/redmine/redmine.git
synced 2024-08-27 05:58:46 +02:00
![Jean-Philippe Lang](/assets/img/avatar_default.png)
git-svn-id: http://svn.redmine.org/redmine/trunk@12421 e93f8b46-1217-0410-a6f0-8f06a7374b81
10 rader
268 B
Ruby
10 rader
268 B
Ruby
class DeleteOrphanTimeEntriesCustomValues < ActiveRecord::Migration
|
|
def up
|
|
CustomValue.where("customized_type = ? AND NOT EXISTS (SELECT 1 FROM #{TimeEntry.table_name} t WHERE t.id = customized_id)", "TimeEntry").delete_all
|
|
end
|
|
|
|
def down
|
|
# nop
|
|
end
|
|
end
|