# 데이터베이스에 있던 마이그레이션이 (누락된) discourse-ai 플러그인에 포함되어 있어 복원 불가

**URL:** https://meta.discourse.org/t/cant-restore-database-because-migration-in-the-database-was-in-the-missing-discourse-ai-plugin/300852
**Category:** Development
**Created:** [3월 25, 2024, 5:15오후 UTC](https://meta.discourse.org/t/cant-restore-database-because-migration-in-the-database-was-in-the-missing-discourse-ai-plugin/300852 "2024-03-25T17:15:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [3월 25, 2024, 5:15오후 UTC](https://meta.discourse.org/t/cant-restore-database-because-migration-in-the-database-was-in-the-missing-discourse-ai-plugin/300852/1 "2024-03-25T17:15:46Z")

</div>

데이터베이스 마이그레이션을 시도하고 있는데 다음과 같은 오류가 발생합니다.

```plaintext
unknown OID 446656: failed to recognize type of 'embeddings'. It will be treated as String.

```

`rake db:migrate:status`를 실행하면 다음과 같은 결과가 표시됩니다.

```plaintext
...
   up 20240304030429 Topic id on incoming email index
   up 20240306063428 Add indexes to notifications
   up 20240307231053 Add topics unread when closed to user options

```

경로에 `\./db/migrate/20240307231053_add_topics_unread_when_closed_to_user_options.rb` 파일이 존재하는 것을 확인할 수 있으므로, 위의 오류로 인해 데이터베이스 마이그레이션이 진행되지 못하고 있으며, 이로 인해 데이터베이스 복원도 막혀 있는 것으로 보입니다.

`pgvector`는 개발용 및 테스트용 데이터베이스에 설치 및 활성화되어 있습니다. 이것이 유일한 추정 가능한 원인이었기 때문입니다…

---

<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: [3월 25, 2024, 6:56오후 UTC](https://meta.discourse.org/t/cant-restore-database-because-migration-in-the-database-was-in-the-missing-discourse-ai-plugin/300852/2 "2024-03-25T18:56:06Z")

</div>

이것은 아마도 `discourse-ai`의 마이그레이션에 관한 것이지, 코어에 관한 것이 아닙니다.

> [@pfaffman](#):
>
> 개발 및 테스트 데이터베이스에서

그러면 프로덕션에서는 아닌 건가요?

`SELECT * FROM pg_extension WHERE extname = 'vector';` 쿼리의 결과는 무엇인가요?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [3월 25, 2024, 7:01오후 UTC](https://meta.discourse.org/t/cant-restore-database-because-migration-in-the-database-was-in-the-missing-discourse-ai-plugin/300852/3 "2024-03-25T19:01:54Z")

</div>

> [@RGJ](#):
>
> 이것은 아마도 `discourse-ai`의 마이그레이션에 관한 것이지, 코어에 관한 것이 아닙니다.

아하. 백업을 생성한 시스템에는 있지만 개발 시스템에는 없는 AI 플러그인을 추가해야 했네요.

한 번 더 시간을 들였지만, 그것이 제가 필요로 했던 힌트였습니다.

정말 감사합니다! 🍺

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4월 24, 2024, 7:02오후 UTC](https://meta.discourse.org/t/cant-restore-database-because-migration-in-the-database-was-in-the-missing-discourse-ai-plugin/300852/4 "2024-04-24T19:02:41Z")

</div>

이 주제는 마지막 답변 후 30일이 지나면 자동으로 닫힙니다. 더 이상 새 답변을 게시할 수 없습니다.
