paperclipai/paperclip · error · Error
Plugin migration objects must use fully qualified schema nam
Error message
Plugin migration objects must use fully qualified schema names
What it means
Qualification guard: the migration statement contains no schema-qualified object reference (create table/view, drop table, into, truncate table, update, alter) and is not a comment. Unqualified objects would land in the wrong schema (typically public), so migrations must name the plugin namespace explicitly; the unqualified migration is at fault.
Source
Thrown at server/src/services/plugin-database.ts:217
if (/^\s*(drop|truncate)\b/.test(normalized)) {
throw new Error("Destructive plugin migrations are not allowed in Phase 1");
}
if (/\bdelete\s+from\b/.test(normalized)) {
throw new Error("Plugin migrations cannot delete data");
}
const ddlOrBackfillAllowed =
/^(create|alter|comment)\b/.test(normalized) ||
/^(insert\s+into|update)\b/.test(normalized) ||
(normalized.startsWith("with ") && /\b(insert\s+into|update)\b/.test(normalized));
if (!ddlOrBackfillAllowed) {
throw new Error("Plugin migrations may contain DDL or namespace-scoped backfill statements only");
}
const refs = extractQualifiedRefs(statement);
if (refs.length === 0 && !normalized.startsWith("comment ")) {
throw new Error("Plugin migration objects must use fully qualified schema names");
}
const objectRefKeywords = new Set([
"alter table",
"create index",
"create table",
"create view",
"drop table",
"into",
"truncate table",
"update",
]);
const hasQualifiedObjectRef = refs.some((ref) => objectRefKeywords.has(ref.keyword));
if (!hasQualifiedObjectRef && !normalized.startsWith("comment ")) {
throw new Error("Plugin migration objects must use fully qualified schema names");
}
const allowedCoreReadTables = new Set(coreReadTables);View on GitHub (pinned to 120ae5428f)
Solutions
- Qualify all object names in the migration with the plugin's schema name.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/services/plugin-database.ts:217 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/ddcaed54ba10e337.
Report an issue: GitHub.