Create migration table if not exists :param conn: asyncpg database connection
(
conn,
)
| 8 | |
| 9 | |
| 10 | async def create_migration_table( |
| 11 | conn, |
| 12 | ): |
| 13 | """ |
| 14 | Create migration table if not exists |
| 15 | |
| 16 | :param conn: asyncpg database connection |
| 17 | """ |
| 18 | try: |
| 19 | await conn.execute( |
| 20 | f""" |
| 21 | CREATE TABLE IF NOT EXISTS {MIGRATION_TABLE} ( |
| 22 | version INTEGER PRIMARY KEY |
| 23 | ); |
| 24 | """ |
| 25 | ) |
| 26 | except Exception as e: |
| 27 | logger.error(f"Error creating migration table: {e}") |
| 28 | |
| 29 | |
| 30 | async def get_current_version( |
no test coverage detected