Skip to content

Conversation

@LaserBread
Copy link
Contributor

@LaserBread LaserBread commented Oct 13, 2025

Pull Request Template

Description

I discovered Sequelize would crash on MariaDB when core/db/migrations/20250118235051-change-grading-attendance.js attempted to delete QuestionInLecture.order. There was a key constraining QuestionInLecture.order and QuestionInLecture.lectureId, that in turn was constrained to a foreign key binding QuestionInLecture.lectureId and Lecture.id. I made the script not delete QuestionInLecture.order until both keys were deleted too.

Fixes #332

Additional Information

Testing on a MySQL-based system is needed.

Checklist:

Before you submit your Pull Request, please make sure you have completed the following tasks:

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.
  • I have tagged my PR with the appropriate label(s).

@LaserBread LaserBread requested a review from a team as a code owner October 13, 2025 23:35
@MigrainePanda MigrainePanda added the bug Something isn't working label Nov 20, 2025
@LaserBread LaserBread enabled auto-merge November 21, 2025 02:13
Copy link
Contributor

@MigrainePanda MigrainePanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, looks good now

@LaserBread LaserBread added this pull request to the merge queue Nov 21, 2025
@github-project-automation github-project-automation bot moved this from Backlog to In Progress in classroom-polling Nov 21, 2025
Merged via the queue into OSU-MC:development with commit a06bf21 Nov 21, 2025
8 checks passed
@LaserBread LaserBread deleted the Sequelize-Fix branch November 21, 2025 19:43
@github-project-automation github-project-automation bot moved this from In Progress to Done in classroom-polling Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Sequelize Migration Crashes on MariaDB because of a foreign key dependency.

2 participants