Merge pull request #230 from openHPI/fix_download
Specify `ExternalUser` as class for `user` in `RemoteEvaluationMapping`
This commit is contained in:
@ -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
|
@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2018_09_04_115948) do
|
||||
ActiveRecord::Schema.define(version: 2018_11_26_163428) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@ -290,6 +290,7 @@ ActiveRecord::Schema.define(version: 2018_09_04_115948) do
|
||||
t.string "validation_token", null: false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "user_type"
|
||||
end
|
||||
|
||||
create_table "request_for_comments", force: :cascade do |t|
|
||||
|
Reference in New Issue
Block a user