In addition to supporting SQLite by default, we should also support PostgreSQL.
Users should be able to use SQLite out of the box, without further configuration - as they do now. But should also be able to export a DATABASE_URI environment variable that contains a PostgreSQL connection string, in which case we should switch to PostgreSQL as the backend.
SQLModel schema should not need to change for that - just the engine would have to be correctly initialised.
Use the asyncpg module for this, ideally.
Using PostgreSQL as the backend will allow us in the future to make use of the pgvector extension in order to store embeddings for each diff / analysis / summary and query those in natural language for similarity.
In addition to supporting SQLite by default, we should also support PostgreSQL.
Users should be able to use SQLite out of the box, without further configuration - as they do now. But should also be able to export a DATABASE_URI environment variable that contains a PostgreSQL connection string, in which case we should switch to PostgreSQL as the backend.
SQLModel schema should not need to change for that - just the engine would have to be correctly initialised.
Use the
asyncpgmodule for this, ideally.Using PostgreSQL as the backend will allow us in the future to make use of the
pgvectorextension in order to store embeddings for each diff / analysis / summary and query those in natural language for similarity.