Skip to content

[HnR-Autograder:1] DB migration - #7439

Draft
Elimpizza wants to merge 1 commit into
mainfrom
feat/hnr-autograder-migration
Draft

[HnR-Autograder:1] DB migration#7439
Elimpizza wants to merge 1 commit into
mainfrom
feat/hnr-autograder-migration

Conversation

@Elimpizza

Copy link
Copy Markdown
Contributor

This pull request introduces a database schema migration to support tracking the predecessor of each auto grading configuration for assignments. The main change is the addition of a self-referential foreign key to the assignment_auto_grading_config table, allowing each configuration to reference its previous version. This enables a linear history of configuration changes without allowing forks.

Schema changes to assignment_auto_grading_config:

  • Added a nullable previous_config_id column to assignment_auto_grading_config, allowing each configuration to reference a predecessor.
  • Created a foreign key constraint on previous_config_id referencing the id of the same table, with cascading deletes.
  • Added a unique constraint on previous_config_id to ensure that each configuration can only be the predecessor of at most one other configuration, preventing forks in the configuration history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants