Documentation ¶
Index ¶
- func GetCurrentSchema(db *sql.DB) ([]byte, error)
- func InitMetadata(db *sql.DB) error
- func MapSchema(schema []Table) map[string]Table
- func Migration(db *sql.DB, currentSchema []Table, newSchema []Table) error
- func SchemaUpgrade(db *sql.DB, currentSchema []Table, newSchema []Table) error
- func SetSchema(db *sql.DB, data io.Reader) error
- func Transaction(db *sql.DB, handler func() error) error
- func Verify(tables []Table) error
- type SameFields
- type SameTables
- type Table
- type TableField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitMetadata ¶
Types ¶
type SameFields ¶
type SameFields struct { Current TableField New TableField }
type SameTables ¶
type Table ¶
type Table struct { Name string `json:"name"` Fields []TableField `json:"fields"` PrimaryKey []string `json:"primary_key"` }
type TableField ¶
Click to show internal directories.
Click to hide internal directories.