{"id":26741,"library":"asyncpg-trek","title":"asyncpg-trek","description":"A simple migrations system for asyncpg and aiosqlite. Current version 0.4.0, supports Python 3.8+. Release cadence is irregular, with few releases since inception.","status":"active","version":"0.4.0","language":"python","source_language":"en","source_url":"https://github.com/adriangb/asyncpg-trek","tags":["asyncpg","migrations","database","postgresql","aiosqlite"],"install":[{"cmd":"pip install asyncpg-trek","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required for asyncpg backend (default).","package":"asyncpg","optional":false},{"reason":"Required for aiosqlite backend, added in 0.4.0.","package":"aiosqlite","optional":true}],"imports":[{"note":"No common wrong import known.","symbol":"asyncpg_trek","correct":"import asyncpg_trek"}],"quickstart":{"code":"import asyncio\nimport asyncpg_trek\nimport os\n\nasync def main():\n    conn = await asyncpg.connect(\n        user='postgres',\n        password=os.environ.get('PGPASSWORD', ''),\n        database='test'\n    )\n    await asyncpg_trek.migrate(conn, migrations_path='./migrations')\n    await conn.close()\n\nasyncio.run(main())","lang":"python","description":"Run migrations using an asyncpg connection and a local 'migrations' directory."},"warnings":[{"fix":"Check if you use custom backends; update imports if needed.","message":"In 0.4.0, the aiosqlite backend was added, potentially changing import paths or the SupportsBackend interface.","severity":"breaking","affected_versions":"0.3.x -> 0.4.0"},{"fix":"If you implemented a custom backend, split your class according to the new interfaces.","message":"In 0.3.0, SupportsBackend was split into SupportsBackend and SupportsBackendExecutor, breaking custom backends.","severity":"breaking","affected_versions":"0.2.x -> 0.3.0"},{"fix":"No immediate action needed.","message":"The default backend may be deprecated in the future as aiosqlite support matures.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install aiosqlite","cause":"Using aiosqlite backend without installing aiosqlite.","error":"ModuleNotFoundError: No module named 'aiosqlite'"},{"fix":"Ensure you call asyncpg_trek.migrate() before running migrations, and verify the database schema is accessible.","cause":"The migrations tracking table was not created; migration script not run or connection without schema.","error":"asyncpg.exceptions.PostgresError: relation 'asyncpg_trek_migrations' does not exist"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}