Adds a permission to log time for another user (#3848).

Patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@17755 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2018-12-16 16:28:22 +00:00
parent 537f162f27
commit 2fdbcd35dd
14 changed files with 214 additions and 22 deletions

View File

@@ -0,0 +1,11 @@
class AddAuthorIdToTimeEntries < ActiveRecord::Migration[5.1]
def up
add_column :time_entries, :author_id, :integer, :default => nil, :after => :project_id
# Copy existing user_id to author_id
TimeEntry.update_all('author_id = user_id')
end
def down
remove_column :time_entries, :author_id
end
end