fix (codegen): don't duplicate the primary-key getter for 'without rowid' tables

This commit is contained in:
2026-09-19 21:36:31 -07:00
parent 40bc0db036
commit 9d4a1eab10
4 changed files with 17 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ func SchemaFromDB(db *sqlx.DB) Schema {
}
var indexes []Index
must.Do(db.Select(&indexes, `select index_name, table_name, is_unique from indexes`))
must.Do(db.Select(&indexes, `select index_name, table_name, is_unique, origin from indexes`))
for _, idx := range indexes {
must.Do(db.Select(&idx.Columns, `select column_name from index_columns where index_name = ? order by rank`, idx.Name))
ret.Indexes[idx.Name] = idx