<p>The error appears when an ALTER TABLE statement tries to expose or replace the hidden full-text column FTS_DOC_ID with a regular, user-visible column.</p>
<p>MySQL Error 1855 ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS occurs when ALTER TABLE touches the hidden FTS_DOC_ID column created by full-text indexes. Leave that column hidden or rebuild the full-text index to resolve the issue.</p>
Cannot replace hidden FTS_DOC_ID with a user-visible one
Error 1855 is raised by the MySQL server when an ALTER TABLE statement attempts to replace or expose the internal column FTS_DOC_ID that underpins InnoDB full-text search indexes. This helper column is generated automatically and must remain hidden.
The error was introduced in MySQL 5.7.1 as part of enhanced full-text search support. Any DDL that makes the column visible or overrides it with a user-defined name will fail with SQLSTATE HY000.
MySQL triggers error 1855 when ALTER TABLE ADD COLUMN or CHANGE COLUMN references FTS_DOC_ID directly or implicitly via RENAME COLUMN. Because the column is flagged HIDDEN, the storage engine blocks visibility changes.
The same check fires when a CREATE TABLE ... LIKE or OPTIMIZE TABLE sequence tries to materialize the hidden column in the new definition.
Remove FTS_DOC_ID from the ALTER statement. Instead, perform the desired schema change without touching the hidden column. If you need a user-visible document ID, add a new column with a different name and update your application logic.
When restructuring full-text indexes, drop the existing index, run the ALTER you need, and recreate the full-text index. This sequence lets MySQL regenerate FTS_DOC_ID safely.
Developers often hit error 1855 during automated migrations that iterate through every column. Exclude FTS_DOC_ID from generation scripts to avoid failures.
Tools that clone tables with CREATE TABLE ... LIKE should use --skip-hidden-columns or equivalent logic to prevent hidden column leakage.
Never reference FTS_DOC_ID in DDL or SELECT lists. Treat it as an implementation detail managed by MySQL.
Use meaningful surrogate keys or PRIMARY KEY values for document IDs instead of relying on the internal column.
Errors 1845 and 1846 also protect hidden full-text metadata columns. They surface when attempting to rename or change attributes of those columns. The fixes mirror those for error 1855 - leave hidden columns untouched.
Attempts to add a visible column with the same name collide with the hidden column.
Change or rename commands that target FTS_DOC_ID explicitly trigger the protection.
CREATE TABLE ... LIKE inadvertently includes hidden columns unless filtered out.
Code-first migration tools may iterate through information_schema and replicate all columns, including hidden ones.
Raised when attempting to change the data type of a hidden full-text column.
Occurs when hidden FTS columns conflict with foreign key alterations.
Appears when ALTER TABLE references a non-existent column, often due to filtering out hidden columns incorrectly.
No. Dropping the column breaks the full-text index. Drop the index first, then MySQL will remove the column.
The check exists in MySQL 5.7.1 and higher, including all 8.x releases.
Galaxys schema-aware auto-complete hides FTS_DOC_ID, preventing accidental inclusion in generated ALTER statements.
MySQL does not allow renaming. Add a separate visible column instead.