Files
turso/sql_generation
Glauber Costa c340222f60 sqlite/parser: keep GENERATED ALWAYS in rendered schema text
Turso stores schema SQL by re-rendering the statement from the AST, and
the AST did not record whether the user wrote GENERATED ALWAYS AS or the
bare AS form, so the keywords vanished from sqlite_master. SQLite keeps
the original spelling, and tools that round-trip schema text depend on
it.

Record the spelling on the generated-column constraint, emit it from
both renderers (the AST token stream used by RENAME, and the column
metadata renderer used by ADD COLUMN), and only where the user actually
wrote it — bare AS stays bare.

Tests: spelling round-trip coverage through CREATE and the ALTER paths
in gencol.sqltest.

Fixes #6155

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-16 15:15:48 +00:00
..
2025-08-25 22:59:31 -03:00