mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-26 20:44:23 +01:00
indexes with the naming scheme "sqlite_autoindex_<tblname>_<number>" are automatically created when a table is created with UNIQUE or PRIMARY KEY definitions. these indexes must map to the table definition SQL in definition order, i.e. sqlite_autoindex_foo_1 must be the first instance of UNIQUE or PRIMARY KEY and so on. this commit fixes our autoindex creation / parsing so that this invariant is upheld.