Skip to content

.transform() drops check constraints and comments #762

Description

@simonw

Calling .transform() on a table currently recreates that table without check constraints and without any comments, because those live only in the SQL create table statement and are not exposed via any PRAGMA.

Separately, if the table has a column-level UNIQUE constraint, SQLite backs it with an internal auto-index that has no CREATE INDEX statement. .transform()'s index-rebuild step can't reproduce that, so it raises TransformError and aborts instead of preserving the constraint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions