Skip to content

Commit

Permalink
Merge pull request #5874 from dodona-edu/fix/default-judge
Browse files Browse the repository at this point in the history
Make TESTed the default 'default judge' for repositories
  • Loading branch information
jorg-vr authored Oct 18, 2024
2 parents 5628de2 + 978fd31 commit 76f5ab3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/models/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# name :string(255)
# remote :string(255)
# path :string(255)
# judge_id :integer
# judge_id :integer default(17)
# created_at :datetime not null
# updated_at :datetime not null
# clone_status :integer default("queued"), not null
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class SetDefaultJudgeForRepositories < ActiveRecord::Migration[7.2]
def change
change_column_default :repositories, :judge_id, from: nil, to: 17
end
end
4 changes: 2 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.2].define(version: 2024_09_11_085152) do
ActiveRecord::Schema[7.2].define(version: 2024_10_17_143229) do
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
Expand Down Expand Up @@ -390,7 +390,7 @@
t.string "name"
t.string "remote"
t.string "path"
t.integer "judge_id"
t.integer "judge_id", default: 17
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.integer "clone_status", default: 1, null: false
Expand Down
2 changes: 1 addition & 1 deletion test/factories/repositories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# name :string(255)
# remote :string(255)
# path :string(255)
# judge_id :integer
# judge_id :integer default(17)
# created_at :datetime not null
# updated_at :datetime not null
# clone_status :integer default("queued"), not null
Expand Down
2 changes: 1 addition & 1 deletion test/models/repository_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# name :string(255)
# remote :string(255)
# path :string(255)
# judge_id :integer
# judge_id :integer default(17)
# created_at :datetime not null
# updated_at :datetime not null
# clone_status :integer default("queued"), not null
Expand Down

0 comments on commit 76f5ab3

Please sign in to comment.