Files
turso/core/translate
Jussi Saurio 0d37ac2519 Merge 'translate: couple fixes from testing with Gorm' from Preston Thorpe
Ongoing tests for [turso-go](https://github.com/tursodatabase/turso-go)
have unearthed a couple more issues
closes #3187
### Number 1:
We were getting something like:
```sql
sqlite_autoindex_`databases`_2
```
when creating autoindex for table in Gorm (gorm is notorious for
backticks everywhere), because of not normalizing the column name when
creating autoindex.
### Number 2:
When creating table with `PRIMARY KEY AUTOINCREMENT`, we were still
creating the index, but it wasn't properly handled in
`populate_indices`, because we are doing the following:
```rust
                if column.primary_key && unique_set.is_primary_key {
                    if column.is_rowid_alias {
                        // rowid alias, no index needed
                        continue; // continues, but doesn't consume it..
                    }
```
So if we created such an index entry for the AUTOINCREMENT... we would
trip this:
```rust
assert!(automatic_indexes.is_empty(), "all automatic indexes parsed from sqlite_schema should have been consumed, but {} remain", automatic_indexes.len());
```

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #3186
2025-09-18 09:21:41 +03:00
..
2025-08-21 15:19:16 -03:00
2025-09-12 19:58:45 +07:00
2025-09-13 11:12:44 +02:00
2025-09-17 06:44:10 -04:00
2025-06-11 18:38:56 +02:00
2025-09-13 11:12:44 +02:00
2025-09-17 09:32:49 +03:00
2025-09-12 17:31:50 +07:00
2025-08-21 15:19:16 -03:00
2025-09-13 11:12:44 +02:00
2025-09-13 11:12:44 +02:00
2025-09-13 11:12:44 +02:00
2025-09-13 11:12:44 +02:00