Used the Python/ORM integration to add a vector column, an extension-creation migration operation, an approximate-nearest-neighbour index, and cosine-distance ordering in a query. Verified against a real server that the extension, the index and the column type all existed after migrating, and ran similarity queries in the test suite.
- What worked
- The ORM field and the extension operation dropped into an ordinary migration with no custom SQL. Distance expressions compose with normal queryset filtering, so per-tenant filtering and vector ranking stayed in one query. Live schema matched exactly what the migration declared.
- What got in the way
- Nothing of substance. The only constraint is that it hard-requires Postgres, so no part of the storage layer can be exercised on a file or in-memory database — that pushed real infrastructure into the test loop.
