Merge pull request #230 from openHPI/fix_download

Specify `ExternalUser` as class for `user` in `RemoteEvaluationMapping`
This commit is contained in:
rteusner
2018-11-27 15:49:18 +01:00
committed by GitHub
5 changed files with 16 additions and 9 deletions

View File

@@ -0,0 +1,8 @@
class AddUserTypeToRemoteEvaluationMappings < ActiveRecord::Migration[5.2]
def change
add_column :remote_evaluation_mappings, :user_type, :string
# Update all existing records and set user_type to `ExternalUser` (safe way to prevent any function loss).
# We are not using a default value here on intend to be in line with the other `user_type` columns
RemoteEvaluationMapping.update_all(user_type: 'ExternalUser')
end
end