V2 duplicate-stream fails with `Invalid SingleLineTextShowAs` for a valid linked-table schema
Summary
POST /api/base/duplicate-stream fails in the V2 duplicate path with:
Invalid SingleLineTextShowAsThe error occurs while copying structure only (withRecords: false), so record data is not involved.
The SSE endpoint returns only the generic message and does not report the offending field ID, table ID, or stack trace.
Environment
- Self-hosted Teable Docker image:
release.2026-09-25T09-38-50Z.3268 - The source base has
v2_enabled = true - Endpoint:
POST /api/base/duplicate-stream - Authentication: personal access token
- PostgreSQL backend
Minimal failing selection within the affected base
The smallest currently identified failing selection consists of two linked tables.
Request body:
{
"fromBaseId": "<source base id>",
"spaceId": "<destination space id>",
"name": "DIAG v2 schema",
"withRecords": false,
"nodes": [
"<first table node id>",
"<second table node id>"
]
}SSE result:
{"type":"progress","phase":"duplicate_started"}
{"type":"progress","phase":"structure_creating"}
{"type":"progress","phase":"table_structure_committing","totalTables":2}
{"type":"error","message":"Invalid SingleLineTextShowAs"}No structure_created event is emitted.
What was verified
All active singleLineText fields in both tables were inspected directly in PostgreSQL.
- Ordinary text fields have
options = {} - Active lookup text fields do not contain
showAs - There is no active
showAsvalue other than valid values - The only historical
showAsvalues found in deleted fields are valid:{"type":"url"}{"type":"email"}{"type":"phone"}
The V2 enum accepts exactly url, email, and phone, so none of the stored values are invalid.
The issue is reproducible without records and therefore appears to be in V2 structure export/normalization/import for a linked-table schema, rather than user data.
Related diagnostic results
The following selections succeed with withRecords: false:
- each of several individual tables and unrelated table groups;
- a pair of tables linked through a different relationship.
The error reappears when the failing pair of linked tables is selected together.
Expected behavior
The duplicate operation should complete, or the SSE error should include enough context to identify the invalid value:
- source table ID/name
- source field ID/name
- raw
showAsvalue being parsed - stack trace or structured error code
Actual behavior
The operation fails before creating the destination structure and returns only:
Invalid SingleLineTextShowAsPossible area to inspect
The failure appears to be around V2 conversion of exported field metadata into SingleLineTextShowAs, potentially involving linked/lookup fields or stale metadata while exporting a relationship between two tables.
Source: teableio/teable