Skip to content

Commit

Permalink
fix: remove default from cmi_datamodel in test attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
macite committed Aug 9, 2024
1 parent 7d3e4d3 commit ccb20dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/test_attempt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def specific_permission_hash(role, perm_hash, _other)
# t.float :score_scaled, default: 0

# scorm datamodel
# t.text :cmi_datamodel, default: "{}", null: false
# t.text :cmi_datamodel

after_initialize if: :new_record? do
self.attempted_time = Time.zone.now
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20231205011842_create_test_attempts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def change
t.boolean :completion_status, default: false
t.boolean :success_status, default: false
t.float :score_scaled, default: 0
t.text :cmi_datamodel, default: "{}", null: false
t.text :cmi_datamodel
end
end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
t.boolean "completion_status", default: false
t.boolean "success_status", default: false
t.float "score_scaled", default: 0.0
t.text "cmi_datamodel", default: "{}", null: false
t.text "cmi_datamodel"
t.index ["task_id"], name: "index_test_attempts_on_task_id"
end

Expand Down

0 comments on commit ccb20dc

Please sign in to comment.