Fix failing seeds by setting default host for mailer and update schema
Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
This commit is contained in:
70
db/schema.rb
70
db/schema.rb
@ -1,4 +1,3 @@
|
|||||||
# encoding: UTF-8
|
|
||||||
# This file is auto-generated from the current state of the database. Instead
|
# This file is auto-generated from the current state of the database. Instead
|
||||||
# of editing this file, please use the migrations feature of Active Record to
|
# of editing this file, please use the migrations feature of Active Record to
|
||||||
# incrementally modify your database, and then regenerate this schema definition.
|
# incrementally modify your database, and then regenerate this schema definition.
|
||||||
@ -11,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20180904115948) do
|
ActiveRecord::Schema.define(version: 2018_09_04_115948) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
@ -24,21 +23,19 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.string "reason"
|
t.string "reason"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
t.index ["exercise_collection_id"], name: "index_anomaly_notifications_on_exercise_collection_id"
|
||||||
|
t.index ["exercise_id"], name: "index_anomaly_notifications_on_exercise_id"
|
||||||
|
t.index ["user_type", "user_id"], name: "index_anomaly_notifications_on_user_type_and_user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "anomaly_notifications", ["exercise_collection_id"], name: "index_anomaly_notifications_on_exercise_collection_id", using: :btree
|
|
||||||
add_index "anomaly_notifications", ["exercise_id"], name: "index_anomaly_notifications_on_exercise_id", using: :btree
|
|
||||||
add_index "anomaly_notifications", ["user_type", "user_id"], name: "index_anomaly_notifications_on_user_type_and_user_id", using: :btree
|
|
||||||
|
|
||||||
create_table "code_harbor_links", force: :cascade do |t|
|
create_table "code_harbor_links", force: :cascade do |t|
|
||||||
t.string "oauth2token", limit: 255
|
t.string "oauth2token", limit: 255
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
t.index ["user_id"], name: "index_code_harbor_links_on_user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "code_harbor_links", ["user_id"], name: "index_code_harbor_links_on_user_id", using: :btree
|
|
||||||
|
|
||||||
create_table "comments", force: :cascade do |t|
|
create_table "comments", force: :cascade do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "file_id"
|
t.integer "file_id"
|
||||||
@ -48,11 +45,10 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.text "text"
|
t.text "text"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
t.index ["file_id"], name: "index_comments_on_file_id"
|
||||||
|
t.index ["user_id"], name: "index_comments_on_user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "comments", ["file_id"], name: "index_comments_on_file_id", using: :btree
|
|
||||||
add_index "comments", ["user_id"], name: "index_comments_on_user_id", using: :btree
|
|
||||||
|
|
||||||
create_table "consumers", force: :cascade do |t|
|
create_table "consumers", force: :cascade do |t|
|
||||||
t.string "name", limit: 255
|
t.string "name", limit: 255
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
@ -91,10 +87,9 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.integer "submission_id"
|
t.integer "submission_id"
|
||||||
|
t.index ["submission_id"], name: "index_errors_on_submission_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "errors", ["submission_id"], name: "index_errors_on_submission_id", using: :btree
|
|
||||||
|
|
||||||
create_table "events", force: :cascade do |t|
|
create_table "events", force: :cascade do |t|
|
||||||
t.string "category"
|
t.string "category"
|
||||||
t.string "data"
|
t.string "data"
|
||||||
@ -129,11 +124,10 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.integer "exercise_collection_id"
|
t.integer "exercise_collection_id"
|
||||||
t.integer "exercise_id"
|
t.integer "exercise_id"
|
||||||
t.integer "position", default: 0, null: false
|
t.integer "position", default: 0, null: false
|
||||||
|
t.index ["exercise_collection_id"], name: "index_exercise_collection_items_on_exercise_collection_id"
|
||||||
|
t.index ["exercise_id"], name: "index_exercise_collection_items_on_exercise_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "exercise_collection_items", ["exercise_collection_id"], name: "index_exercise_collection_items_on_exercise_collection_id", using: :btree
|
|
||||||
add_index "exercise_collection_items", ["exercise_id"], name: "index_exercise_collection_items_on_exercise_id", using: :btree
|
|
||||||
|
|
||||||
create_table "exercise_collections", force: :cascade do |t|
|
create_table "exercise_collections", force: :cascade do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
@ -141,10 +135,9 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.boolean "use_anomaly_detection", default: false
|
t.boolean "use_anomaly_detection", default: false
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.string "user_type"
|
t.string "user_type"
|
||||||
|
t.index ["user_type", "user_id"], name: "index_exercise_collections_on_user_type_and_user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "exercise_collections", ["user_type", "user_id"], name: "index_exercise_collections_on_user_type_and_user_id", using: :btree
|
|
||||||
|
|
||||||
create_table "exercise_tags", force: :cascade do |t|
|
create_table "exercise_tags", force: :cascade do |t|
|
||||||
t.integer "exercise_id"
|
t.integer "exercise_id"
|
||||||
t.integer "tag_id"
|
t.integer "tag_id"
|
||||||
@ -166,20 +159,18 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.boolean "allow_file_creation"
|
t.boolean "allow_file_creation"
|
||||||
t.boolean "allow_auto_completion", default: false
|
t.boolean "allow_auto_completion", default: false
|
||||||
t.integer "expected_difficulty", default: 1
|
t.integer "expected_difficulty", default: 1
|
||||||
|
t.index ["id"], name: "index_exercises_on_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "exercises", ["id"], name: "index_exercises_on_id", using: :btree
|
|
||||||
|
|
||||||
create_table "exercises_proxy_exercises", id: false, force: :cascade do |t|
|
create_table "exercises_proxy_exercises", id: false, force: :cascade do |t|
|
||||||
t.integer "proxy_exercise_id"
|
t.integer "proxy_exercise_id"
|
||||||
t.integer "exercise_id"
|
t.integer "exercise_id"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
t.index ["exercise_id"], name: "index_exercises_proxy_exercises_on_exercise_id"
|
||||||
|
t.index ["proxy_exercise_id"], name: "index_exercises_proxy_exercises_on_proxy_exercise_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "exercises_proxy_exercises", ["exercise_id"], name: "index_exercises_proxy_exercises_on_exercise_id", using: :btree
|
|
||||||
add_index "exercises_proxy_exercises", ["proxy_exercise_id"], name: "index_exercises_proxy_exercises_on_proxy_exercise_id", using: :btree
|
|
||||||
|
|
||||||
create_table "external_users", force: :cascade do |t|
|
create_table "external_users", force: :cascade do |t|
|
||||||
t.integer "consumer_id"
|
t.integer "consumer_id"
|
||||||
t.string "email", limit: 255
|
t.string "email", limit: 255
|
||||||
@ -229,10 +220,9 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.float "weight"
|
t.float "weight"
|
||||||
t.string "path", limit: 255
|
t.string "path", limit: 255
|
||||||
t.integer "file_template_id"
|
t.integer "file_template_id"
|
||||||
|
t.index ["context_id", "context_type"], name: "index_files_on_context_id_and_context_type"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "files", ["context_id", "context_type"], name: "index_files_on_context_id_and_context_type", using: :btree
|
|
||||||
|
|
||||||
create_table "hints", force: :cascade do |t|
|
create_table "hints", force: :cascade do |t|
|
||||||
t.integer "execution_environment_id"
|
t.integer "execution_environment_id"
|
||||||
t.string "locale", limit: 255
|
t.string "locale", limit: 255
|
||||||
@ -263,13 +253,12 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.string "activation_state", limit: 255
|
t.string "activation_state", limit: 255
|
||||||
t.string "activation_token", limit: 255
|
t.string "activation_token", limit: 255
|
||||||
t.datetime "activation_token_expires_at"
|
t.datetime "activation_token_expires_at"
|
||||||
|
t.index ["activation_token"], name: "index_internal_users_on_activation_token"
|
||||||
|
t.index ["email"], name: "index_internal_users_on_email", unique: true
|
||||||
|
t.index ["remember_me_token"], name: "index_internal_users_on_remember_me_token"
|
||||||
|
t.index ["reset_password_token"], name: "index_internal_users_on_reset_password_token"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "internal_users", ["activation_token"], name: "index_internal_users_on_activation_token", using: :btree
|
|
||||||
add_index "internal_users", ["email"], name: "index_internal_users_on_email", unique: true, using: :btree
|
|
||||||
add_index "internal_users", ["remember_me_token"], name: "index_internal_users_on_remember_me_token", using: :btree
|
|
||||||
add_index "internal_users", ["reset_password_token"], name: "index_internal_users_on_reset_password_token", using: :btree
|
|
||||||
|
|
||||||
create_table "interventions", force: :cascade do |t|
|
create_table "interventions", force: :cascade do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.text "markup"
|
t.text "markup"
|
||||||
@ -284,10 +273,9 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.jsonb "lti_parameters", default: {}, null: false
|
t.jsonb "lti_parameters", default: {}, null: false
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
t.index ["external_users_id"], name: "index_lti_parameters_on_external_users_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "lti_parameters", ["external_users_id"], name: "index_lti_parameters_on_external_users_id", using: :btree
|
|
||||||
|
|
||||||
create_table "proxy_exercises", force: :cascade do |t|
|
create_table "proxy_exercises", force: :cascade do |t|
|
||||||
t.string "title"
|
t.string "title"
|
||||||
t.string "description"
|
t.string "description"
|
||||||
@ -342,10 +330,9 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
t.integer "submission_id"
|
t.integer "submission_id"
|
||||||
|
t.index ["submission_id"], name: "index_structured_errors_on_submission_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "structured_errors", ["submission_id"], name: "index_structured_errors_on_submission_id", using: :btree
|
|
||||||
|
|
||||||
create_table "submissions", force: :cascade do |t|
|
create_table "submissions", force: :cascade do |t|
|
||||||
t.integer "exercise_id"
|
t.integer "exercise_id"
|
||||||
t.float "score"
|
t.float "score"
|
||||||
@ -354,11 +341,10 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.string "cause", limit: 255
|
t.string "cause", limit: 255
|
||||||
t.string "user_type", limit: 255
|
t.string "user_type", limit: 255
|
||||||
|
t.index ["exercise_id"], name: "index_submissions_on_exercise_id"
|
||||||
|
t.index ["user_id"], name: "index_submissions_on_user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "submissions", ["exercise_id"], name: "index_submissions_on_exercise_id", using: :btree
|
|
||||||
add_index "submissions", ["user_id"], name: "index_submissions_on_user_id", using: :btree
|
|
||||||
|
|
||||||
create_table "subscriptions", force: :cascade do |t|
|
create_table "subscriptions", force: :cascade do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.string "user_type"
|
t.string "user_type"
|
||||||
@ -383,10 +369,9 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.string "cause"
|
t.string "cause"
|
||||||
|
t.index ["submission_id"], name: "index_testruns_on_submission_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "testruns", ["submission_id"], name: "index_testruns_on_submission_id", using: :btree
|
|
||||||
|
|
||||||
create_table "user_exercise_feedbacks", force: :cascade do |t|
|
create_table "user_exercise_feedbacks", force: :cascade do |t|
|
||||||
t.integer "exercise_id", null: false
|
t.integer "exercise_id", null: false
|
||||||
t.integer "user_id", null: false
|
t.integer "user_id", null: false
|
||||||
@ -418,10 +403,9 @@ ActiveRecord::Schema.define(version: 20180904115948) do
|
|||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.string "reason"
|
t.string "reason"
|
||||||
|
t.index ["exercise_id"], name: "index_user_proxy_exercise_exercises_on_exercise_id"
|
||||||
|
t.index ["proxy_exercise_id"], name: "index_user_proxy_exercise_exercises_on_proxy_exercise_id"
|
||||||
|
t.index ["user_type", "user_id"], name: "index_user_proxy_exercise_exercises_on_user_type_and_user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "user_proxy_exercise_exercises", ["exercise_id"], name: "index_user_proxy_exercise_exercises_on_exercise_id", using: :btree
|
|
||||||
add_index "user_proxy_exercise_exercises", ["proxy_exercise_id"], name: "index_user_proxy_exercise_exercises_on_proxy_exercise_id", using: :btree
|
|
||||||
add_index "user_proxy_exercise_exercises", ["user_type", "user_id"], name: "index_user_proxy_exercise_exercises_on_user_type_and_user_id", using: :btree
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -3,6 +3,8 @@ FactoryBot.create(:consumer)
|
|||||||
FactoryBot.create(:consumer, name: 'openSAP')
|
FactoryBot.create(:consumer, name: 'openSAP')
|
||||||
|
|
||||||
# users
|
# users
|
||||||
|
# Set default_url_options explicitly, required for rake task
|
||||||
|
Rails.application.routes.default_url_options = Rails.application.config.action_mailer.default_url_options
|
||||||
[:admin, :external_user, :teacher].each { |factory_name| FactoryBot.create(factory_name) }
|
[:admin, :external_user, :teacher].each { |factory_name| FactoryBot.create(factory_name) }
|
||||||
|
|
||||||
# execution environments
|
# execution environments
|
||||||
|
Reference in New Issue
Block a user