N
Neon12mo ago
ambitious-aqua

Child branches installing different extension versions than parent - breaks prisma migrations

Hi, I seem to have encountered a bug with extension versioning and branching. I am using prisma for migrations and I initially just had this line in my migration CREATE EXTENSION IF NOT EXISTS "vector"; Summary: when creating a child branch, it has 0.7.4 pgvector version even though main branch has 0.7.2. There is no way to change the installed version in branches, and this breaks prisma migrations (and is also unexpected that main and child branches would have different versions). Fixes: Either have a global extension version for all databases, or keep the extension version consistent when branching. My problem specifics: my main database it installed pgvector 0.7.2 (the default version I believe at the time) But any time I create a database branch, the only available verison is 0.7.4. Therefore, all my migrations fail any time I create a database branch. a. If I do not specify the pgvector version CREATE EXTENSION IF NOT EXISTS "vector"; then prisma detects drift and would need to drop all data from the database b. If I do specify the pgvector version CREATE EXTENSION IF NOT EXISTS "vector" VERSION '0.7.2|0.7.4; then my main branch will only accept 0.7.2 and my child branches will only accept 0.7.4 main -> "extension "vector" has no installation script nor update path for version "0.7.2" child branch -> extension "vector" has no installation script nor update path for version "0.7.4" It is not possible to install 0.7.4 in main branch, or 0.7.2 in child branches.
1 Reply
ambitious-aqua
ambitious-aquaOP12mo ago
Update - I opened a support ticket and this is resolved. I was now able to run ALTER EXTENSION vector UPDATE TO '0.7.4'; and now it succeeded in my main branch.

Did you find this page helpful?