This commit is contained in:
@@ -32,5 +32,15 @@ type Table struct {
|
||||
TypeName string
|
||||
}
|
||||
|
||||
// Schema is a container for a bunch of Tables, indexed by table name.
|
||||
type Schema map[string]Table
|
||||
type Index struct {
|
||||
Name string `db:"index_name"`
|
||||
TableName string `db:"table_name"`
|
||||
Columns []string
|
||||
IsUnique bool `db:"is_unique"`
|
||||
// TODO: `where ...` for partial indexes
|
||||
}
|
||||
|
||||
type Schema struct {
|
||||
Tables map[string]Table
|
||||
Indexes map[string]Index
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user