Skip to content

migrateProjectIdToEnvironmentId's raw-driver guard prints its instruction sentence twice #13219

Description

@claude

Spotted while implementing #13205, in the same file but a different defect class, so it was deliberately not fixed in that PR.

packages/metadata/src/migrations/migrate-project-id-to-environment-id.ts throws its "driver is not raw-capable" guard with the same sentence twice:

'migrateProjectIdToEnvironmentId: driver must expose a .raw(sql, bindings?) method. ' +
'migrateProjectIdToEnvironmentId: driver must expose a .raw(sql, bindings?) method. ' +
'SqlDriver (better-sqlite3/knex) supports this; cloud-side TursoDriver also conforms.'

So an operator who calls it with a driver that has no raw() reads the same instruction twice in one message. The sibling migrate-env-id-to-project-id.ts carries the correct single-sentence form of the identical guard, which is where the duplication is visible as a copy-paste artifact rather than intent.

Cosmetic only: the guard fires correctly, the remedy it names is right, and nothing parses the message. Scope is one line.

Verified at main e22158fff; the #13205 PR leaves those three lines byte-identical.

Generated by Claude Code


Generated by Claude Code

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions