Skip to content

Preserve column type size spacing in sqlite_schema SQL#5668

Open
kumarUjjawal wants to merge 2 commits intotursodatabase:mainfrom
kumarUjjawal:fix/preserve_space_column
Open

Preserve column type size spacing in sqlite_schema SQL#5668
kumarUjjawal wants to merge 2 commits intotursodatabase:mainfrom
kumarUjjawal:fix/preserve_space_column

Conversation

@kumarUjjawal
Copy link
Contributor

Description

Fixes sqlite_schema.sql normalization for column type declarations with size parameters.
Specifically, it preserves original spacing/comments/newlines between the type name and size parentheses when storing CREATE TABLE SQL, so declarations like:

  • varchar ( 255)
  • varchar( 255)

remain distinct in sqlite_schema.sql, matching SQLite behavior.

Motivation and context

Issue #3264 reported a compatibility mismatch: Turso normalized both declarations above to the same output (varchar (255)), while SQLite preserves original spacing in sqlite_schema.

Closes #3264

Description of AI Usage

Copy link

@turso-bot turso-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review @PThorpe92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve/don't truncate spaces in column types

1 participant