chore: revert accidental direct commits to master

This commit is contained in:
Łukasz Magiera 2024-03-21 11:08:39 +01:00 committed by Łukasz Magiera
parent 99158dfd87
commit ea19e1df6b

View File

@ -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
}