Skip to content

Conversation

@Computerdores
Copy link
Collaborator

@Computerdores Computerdores commented Jan 18, 2026

Summary

This PR refactors the SQL migrations for old DB versions. Previously these migrations happened out of order and were split between schema changes and data updates. This was done because some SQLAlchemy read operations would otherwise fail due to an incompatible schema1. This refactor rearranges these migrations into chronological order. This was done, because

  • the code was very entangled thus hard to understand und verify,
  • the chronological step-wise way is the typical way of migrating DBs,
  • and because this way, new migrations can be added easily and with confidence that none of the previous steps will interfere or be interfered with

Note for reviewers: The changes were intentionally split into small commits that should be easily verifiable individually, because they make small changes that should change nothing about the correctness of the migration steps.

Note for reviewers 2: This is based on #1294.

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

Footnotes

  1. this was fixed in f28adfd

@Computerdores Computerdores moved this to 🏓 Ready for Review in TagStudio Development Jan 18, 2026
@Computerdores Computerdores added Type: Refactor Code that needs to be restructured or cleaned up TagStudio: Library Relating to the TagStudio library system labels Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TagStudio: Library Relating to the TagStudio library system Type: Refactor Code that needs to be restructured or cleaned up

Projects

Status: 🏓 Ready for Review

Development

Successfully merging this pull request may close these issues.

1 participant