Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Postgres issue not dropping null constraint #154

Merged

Conversation

bjester
Copy link
Member

@bjester bjester commented Mar 7, 2022

Background

In #143 we revised an existing migration which added new columns to make the fields nullable. In addition, we created another migration that also drops the null constraint if the previous migration had already ran. This appears to work fine for SQLite but not for PostgreSQL due to something internal to Django (1.11 at least which is used in Kolibri).

Summary

  • Resolves issues with modified migrations that don't apply correctly with Postgres

TODO

  • Have tests been written for the new code?
  • Has documentation been written/updated?
  • New dependencies (if any) added to requirements file

Reviewer guidance

  • See postgres test failures here before changing the migrate_to of the test to the new migration

Issues addressed

learningequality/kolibri#9139

Documentation

If the PR has documentation, link the file here (either .rst in your repo or if built on Read The Docs)

@bjester bjester changed the base branch from master to release-v0.6.x March 7, 2022 23:58
@bjester bjester requested a review from rtibbles March 8, 2022 00:15
Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Code changes make sense, test covers it.

@rtibbles rtibbles merged commit efc29fd into learningequality:release-v0.6.x Mar 8, 2022
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