From 2160abf7a5301bfc8fc037a2615691dc2d308101 Mon Sep 17 00:00:00 2001 From: Pavel Kvach Date: Sat, 4 May 2024 13:08:39 +0300 Subject: [PATCH] db: Make 'text' field in 'comments' table NOT NULL and handling data 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: - https://github.com/isso-comments/isso/issues/979 - https://github.com/isso-comments/isso/pull/994 --- isso/tests/test_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isso/tests/test_db.py b/isso/tests/test_db.py index c5a62377..f753032f 100644 --- a/isso/tests/test_db.py +++ b/isso/tests/test_db.py @@ -267,7 +267,7 @@ def test_comment_text_not_null_migration_with_rollback_after_error(self): }) try: - db = SQLite3(self.path, conf) + SQLite3(self.path, conf) except RuntimeError as e: self.assertEqual(str(e), "Migrating DB version 4 to 5 failed: no such column: notification")