fix (codegen): don't duplicate the primary-key getter for 'without rowid' tables
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
package schema
|
||||
|
||||
type IndexOrigin string
|
||||
|
||||
const (
|
||||
IndexOriginCreateIndex = IndexOrigin("c")
|
||||
IndexOriginUniqueConstraint = IndexOrigin("u")
|
||||
IndexOriginPrimaryKey = IndexOrigin("pk")
|
||||
)
|
||||
|
||||
type Index struct {
|
||||
Name string `db:"index_name"`
|
||||
TableName string `db:"table_name"`
|
||||
Columns []string
|
||||
IsUnique bool `db:"is_unique"`
|
||||
IsUnique bool `db:"is_unique"`
|
||||
Origin IndexOrigin `db:"origin"`
|
||||
// TODO: `where ...` for partial indexes
|
||||
// TODO: identify columns that are expressions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user