Merging schema_extension #9
@@ -48,7 +48,7 @@ from alpine_bits_python.logging_config import get_logger, setup_logging
|
|||||||
_LOGGER = get_logger(__name__)
|
_LOGGER = get_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
async def migrate_datetime_columns(session: AsyncSession) -> None:
|
async def migrate_datetime_columns(session) -> None:
|
||||||
"""Migrate DateTime columns to TIMESTAMP WITH TIME ZONE.
|
"""Migrate DateTime columns to TIMESTAMP WITH TIME ZONE.
|
||||||
|
|
||||||
This updates the columns to properly handle timezone-aware datetimes.
|
This updates the columns to properly handle timezone-aware datetimes.
|
||||||
@@ -79,11 +79,15 @@ async def fix_sequences(database_url: str) -> None:
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
database_url: PostgreSQL database URL
|
database_url: PostgreSQL database URL
|
||||||
|
|
||||||
"""
|
"""
|
||||||
_LOGGER.info("=" * 70)
|
_LOGGER.info("=" * 70)
|
||||||
_LOGGER.info("PostgreSQL Migration & Sequence Fix")
|
_LOGGER.info("PostgreSQL Migration & Sequence Fix")
|
||||||
_LOGGER.info("=" * 70)
|
_LOGGER.info("=" * 70)
|
||||||
_LOGGER.info("Database: %s", database_url.split("@")[-1] if "@" in database_url else database_url)
|
_LOGGER.info(
|
||||||
|
"Database: %s",
|
||||||
|
database_url.split("@")[-1] if "@" in database_url else database_url,
|
||||||
|
)
|
||||||
_LOGGER.info("=" * 70)
|
_LOGGER.info("=" * 70)
|
||||||
|
|
||||||
# Create engine and session
|
# Create engine and session
|
||||||
|
|||||||
Reference in New Issue
Block a user