# Dev migration error: PGVector

**URL:** https://meta.discourse.org/t/dev-migration-error-pgvector/376162
**Category:** Development
**Created:** [July 28, 2025, 11:25am UTC](https://meta.discourse.org/t/dev-migration-error-pgvector/376162 "2025-07-28T11:25:59Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 28, 2025, 11:26am UTC](https://meta.discourse.org/t/dev-migration-error-pgvector/376162/1 "2025-07-28T11:26:00Z")

</div>

Caused by Discourse AI:

```plaintext
== 20240611170904 UpgradePgvector070: migrating =============================== rake aborted! StandardError: An error has occurred, this and all later migrations canceled: (StandardError)

```

```plaintext
ERROR: syntax error at or near "("
/home/robert/discourse/lib/mini_sql_multisite_connection.rb:109:in `run'
/home/robert/discourse/plugins/discourse-ai/db/migrate/20240611170904_upgrade_pgvector_070.rb:10:in `up'
/home/robert/discourse/lib/freedom_patches/schema_migration_details.rb:8:in `block in exec_migration'
/home/robert/discourse/lib/freedom_patches/schema_migration_details.rb:8:in `exec_migration'
/home/robert/discourse/lib/migration/safe_migrate.rb:28:in `migrate'

```

I don’t use the plugin but it’s now bundled.

Anyone solved this before?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 28, 2025, 11:41am UTC](https://meta.discourse.org/t/dev-migration-error-pgvector/376162/2 "2025-07-28T11:41:16Z")

</div>

It’s my version of Postgres I believe, I’ll try to upgrade

---

<div class="post-metadata">

### Author: ![jahan\_gagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jahan_gagan/32/501948_2.png) [@jahan\_gagan](https://meta.discourse.org/u/jahan_gagan)
#### Post date: [July 28, 2025, 11:48am UTC](https://meta.discourse.org/t/dev-migration-error-pgvector/376162/3 "2025-07-28T11:48:01Z")

</div>

Upgrading PostgreSQL will resolve the issue, as the current version doesn’t support the syntax used by the `pgvector` extension in this migration.

---

<div class="post-metadata">

### Author: ![elmuerte](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elmuerte/32/456517_2.png) [@elmuerte](https://meta.discourse.org/u/elmuerte)
#### Post date: [July 28, 2025, 1:04pm UTC](https://meta.discourse.org/t/dev-migration-error-pgvector/376162/4 "2025-07-28T13:04:57Z")

</div>

We also need to upgrade PostgreSQL when going to 3.5, besides installing the pgvector extension?  
What is the minimum required PostgreSQL version?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 28, 2025, 1:05pm UTC](https://meta.discourse.org/t/dev-migration-error-pgvector/376162/5 "2025-07-28T13:05:31Z")

</div>

I moved to 16, but 13 might suffice.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [July 28, 2025, 1:39pm UTC](https://meta.discourse.org/t/dev-migration-error-pgvector/376162/6 "2025-07-28T13:39:11Z")

</div>

I don’t understand this topic. That migration runs fine on PG13.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 28, 2025, 2:02pm UTC](https://meta.discourse.org/t/dev-migration-error-pgvector/376162/7 "2025-07-28T14:02:52Z")

</div>

I was running 12 :).

But thanks for confirmation.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [August 27, 2025, 2:02pm UTC](https://meta.discourse.org/t/dev-migration-error-pgvector/376162/8 "2025-08-27T14:02:58Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
