fix: preserve NUL characters in persisted messages
Store message text as UTF-8 bytes and migrate existing rows without loss. Cover HTTP round trips, restart persistence, Unicode limits and idempotent retries. Adapt direct database tools to the binary storage format. (cherry picked from commit 386276532730b8758298080b49db63738ca300a4)
This commit is contained in:
@@ -30,7 +30,7 @@ class DatabaseTests(unittest.TestCase):
|
||||
def test_migration_and_unique_username_race(self):
|
||||
with psycopg.connect(URL) as conn:
|
||||
versions = conn.execute("SELECT version FROM schema_migrations").fetchall()
|
||||
self.assertEqual(versions, [(1,), (2,), (3,)])
|
||||
self.assertEqual(versions, [(1,), (2,), (3,), (9,)])
|
||||
name = "u_" + uuid4().hex[:16]
|
||||
|
||||
def register(_):
|
||||
|
||||
Reference in New Issue
Block a user