mirror of
https://github.com/redmine/redmine.git
synced 2025-12-15 21:10:27 +01:00
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:
11
db/migrate/20180501132547_add_author_id_to_time_entries.rb
Normal file
11
db/migrate/20180501132547_add_author_id_to_time_entries.rb
Normal 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
|
||||
Reference in New Issue
Block a user