Add user_type to RemoteEvaluationMappings

This commit is contained in:
Sebastian Serth
2018-11-26 17:56:07 +01:00
parent bb10e191ed
commit 1131d08e2b
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