Fix timestamp column migration comment typos

- Correct timezone-related comments
- Fix typo in debug log message
- Update migration success message
- Maintain same migration logic
This commit is contained in:
yangdx 2025-07-16 14:27:52 +08:00
parent 7f9b15dcf3
commit bd340fece6

View file

@ -181,7 +181,7 @@ class PostgreSQLDB:
)
async def _migrate_timestamp_columns(self):
"""Migrate timestamp columns in tables to timezone-aware types, assuming original data is in UTC time"""
"""Migrate timestamp columns in tables to witimezone-free types, assuming original data is in UTC time"""
# Tables and columns that need migration
tables_to_migrate = {
"LIGHTRAG_VDB_ENTITY": ["create_time", "update_time"],
@ -211,7 +211,7 @@ class PostgreSQLDB:
data_type = column_info.get("data_type")
if data_type == "timestamp without time zone":
logger.debug(
f"Column {table_name}.{column_name} is already timezone-aware, no migration needed"
f"Column {table_name}.{column_name} is already witimezone-free, no migration needed"
)
continue
@ -227,7 +227,7 @@ class PostgreSQLDB:
await self.execute(migration_sql)
logger.info(
f"Successfully migrated {table_name}.{column_name} to timezone-aware type"
f"Successfully migrated {table_name}.{column_name} to timezone-free type"
)
except Exception as e:
# Log error but don't interrupt the process