Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`bos db doctor` checks expected tables only in `public` — misreports plugin_schema (v2) and v1 topologies

オープン
#663 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
database

調査の方向性

Read services/db/doctor.ts and compare its missing-tables query with the schemaName handling in runMigrations and detectDrift. Trace how workspace topology determines the data schema for plugins versus api/auth or dedicated databases. Done means the doctor checks expected tables in the schema used by each topology and reports healthy and drift states consistently.

索引モデルが issue の本文から書いたものです。

説明

Environment

everything-dev 2.0.0-rc.27

Where

services/db/doctor.ts — the missing-tables query hard-codes the schema:

```ts
// dist/services/db/doctor.mjs:60
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public'
AND table_name = ANY($1)
```

Context

v2 scopes plugin data tables into a `plugin_` schema on the shared database: the driver sets `search_path="plugin_,public"` per pooled connection, and `runMigrations` / `detectDrift` take a `schemaName` parameter they use for the same table-existence query. The migration journal is the shared `drizzle.__drizzle_migrations`. The doctor never learned about the namespace.

Failure modes (both observed on nearbuilders.org during a v1→v2 consolidation)

  1. v1 per-plugin database (tables in `public`, journal present): doctor reports `healthy` while boot fails with `drift-safe-repair` — because the runtime checks `plugin_`, not `public`.
  2. Consolidated shared database (tables in `plugin_`): doctor reports `drift-safe-repair` for completely healthy databases. Combined with `bos db repair` (see my related issue on repair) this invites destroying a working state.

Suggested fix

Resolve the workspace's data schema per topology — `plugin_` for plugins, `public` for api/auth/dedicated-DB — and query the expected tables there, mirroring `detectDrift`'s `schemaName` handling.

主要言語
TypeScript
スター
5
フォーク
3
平均マージ
9時間 37分
マージ済み PR(30日)
157

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NEARBuilders/everything-dev のほかの issue

NEARBuilders/everything-dev の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。