-
Notifications
You must be signed in to change notification settings - Fork 438
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
db: Make 'text' field in 'comments' table NOT NULL and handling data migration #1019
db: Make 'text' field in 'comments' table NOT NULL and handling data migration #1019
Conversation
d18cec1
to
27bdc72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice effort, thank you.
I noticed that these lines should have been a migration as well:
Lines 44 to 47 in 27bdc72
try: | |
self.db.execute(['ALTER TABLE comments ADD COLUMN notification INTEGER DEFAULT 0;']) | |
except Exception: | |
pass |
Could you add them while you're at it?
Thanks for the review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a massive improvement, thank you! A few suggestions inline, feel free to ignore if you feel they are too nitpicky.
@ix5 |
…migration This update introduces a schema migration to version 4 for the database, focusing on enhancing the 'comments' table. This ensures that the 'text' field in the 'comments' table will always have a value, which improves data consistency and integrity. See: - isso-comments#979 - isso-comments#994
eac0b37
to
c8602c0
Compare
Squashed (pushed to your branch) and merged. I have a few changes that I wrote and stashed locally when reviewing this, but that's for another day. This PR is a great improvement that allows for more confidence when releasing the next version. |
Great, thank you. |
Checklist
CHANGES.rst
because this is a user-facing change or an important bugfixWhat changes does this Pull Request introduce?
This update introduces a schema migration to version 4 for the database, focusing on enhancing the 'comments' table. This ensures that the 'text' field in the 'comments' table will always have a value, which improves data consistency and integrity.
The key changes:
Why is this necessary?