fix: add UTF-8 encoding for async migrations file reading (#279)

Add UTF-8 encoding when opening migration files.
This commit is contained in:
Bui Thanh Son 2025-11-27 19:59:47 +07:00 committed by GitHub
parent 45a99831a9
commit 55b8e6380c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,7 @@ class AsyncMigration:
@classmethod
def from_file(cls, file_path: str) -> "AsyncMigration":
"""Create migration from SQL file."""
with open(file_path, "r") as file:
with open(file_path, "r", encoding="utf-8") as file:
raw_content = file.read()
# Clean up SQL content
lines = []