mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
refactor schema versions to be ints, not strings
This commit is contained in:
parent
70b8bf75c5
commit
dc456bd6a4
3 changed files with 117 additions and 115 deletions
|
|
@ -71,12 +71,12 @@ func SafeErrorParam(param string) string {
|
|||
}
|
||||
|
||||
type IncompatibleSchemaError struct {
|
||||
CurrentVersion string
|
||||
RequiredVersion string
|
||||
CurrentVersion int
|
||||
RequiredVersion int
|
||||
}
|
||||
|
||||
func (err *IncompatibleSchemaError) Error() string {
|
||||
return fmt.Sprintf("Database requires update. Expected schema v%s, got v%s", err.RequiredVersion, err.CurrentVersion)
|
||||
return fmt.Sprintf("Database requires update. Expected schema v%d, got v%d", err.RequiredVersion, err.CurrentVersion)
|
||||
}
|
||||
|
||||
func NanoToTimestamp(nanotime int64) string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue