chore: revert accidental direct commits to master
This commit is contained in:
parent
99158dfd87
commit
ea19e1df6b
@ -263,7 +263,6 @@ func (db *DB) upgrade() error {
|
||||
if len(dir) == 0 {
|
||||
logger.Error("No sql files found.")
|
||||
}
|
||||
last := ""
|
||||
for _, e := range dir {
|
||||
name := e.Name()
|
||||
if !strings.HasSuffix(name, ".sql") {
|
||||
@ -274,9 +273,6 @@ func (db *DB) upgrade() error {
|
||||
logger.Debug("DB Schema " + name + " already applied.")
|
||||
continue
|
||||
}
|
||||
if last[:8] == name[:8] {
|
||||
return xerrors.Errorf("Two files have the same date prefix: " + last + " and " + name)
|
||||
}
|
||||
file, err := fs.ReadFile("sql/" + name)
|
||||
if err != nil {
|
||||
logger.Error("weird embed file read err")
|
||||
@ -300,7 +296,6 @@ func (db *DB) upgrade() error {
|
||||
logger.Error("Cannot update base: " + err.Error())
|
||||
return xerrors.Errorf("cannot insert into base: %w", err)
|
||||
}
|
||||
last = name
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user