Persist Execution Environment when running code

This commit is contained in:
Sebastian Serth
2022-04-15 15:16:57 +02:00
parent 4887f4af02
commit d10735d0a8
7 changed files with 39 additions and 4 deletions

View File

@ -0,0 +1,12 @@
# frozen_string_literal: true
class AddTestrunExecutionEnvironment < ActiveRecord::Migration[6.1]
def change
create_table :testrun_execution_environments do |t|
t.belongs_to :testrun, foreign_key: true, null: false, index: true
t.belongs_to :execution_environment, foreign_key: true, null: false, index: {name: 'index_testrun_execution_environments'}
t.timestamps
end
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_11_18_185051) do
ActiveRecord::Schema.define(version: 2022_04_15_125948) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
@ -461,6 +461,15 @@ ActiveRecord::Schema.define(version: 2021_11_18_185051) do
t.datetime "updated_at"
end
create_table "testrun_execution_environments", force: :cascade do |t|
t.bigint "testrun_id", null: false
t.bigint "execution_environment_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["execution_environment_id"], name: "index_testrun_execution_environments"
t.index ["testrun_id"], name: "index_testrun_execution_environments_on_testrun_id"
end
create_table "testruns", id: :serial, force: :cascade do |t|
t.boolean "passed"
t.text "output"
@ -536,6 +545,8 @@ ActiveRecord::Schema.define(version: 2021_11_18_185051) do
add_foreign_key "exercise_tips", "tips"
add_foreign_key "remote_evaluation_mappings", "study_groups"
add_foreign_key "submissions", "study_groups"
add_foreign_key "testrun_execution_environments", "execution_environments"
add_foreign_key "testrun_execution_environments", "testruns"
add_foreign_key "tips", "file_types"
add_foreign_key "user_exercise_feedbacks", "submissions"
end