feat(analyst): этапы задачи — аналитик раскладывает на steps с критериями готовности, dev идёт по ним
Some checks failed
CI / test (push) Failing after 1m52s
CI / build-and-package (amd64, linux) (push) Failing after 1m3s
CI / build-and-package (amd64, windows) (push) Successful in 30s

This commit is contained in:
ki.sagidullin
2026-08-24 18:05:06 +05:00
parent 6546f18348
commit 6c0b903794
10 changed files with 286 additions and 50 deletions

View File

@@ -173,6 +173,13 @@ func (s *Storage) migrate(ctx context.Context) error {
return fmt.Errorf("%w: migrate add repos: %w", ErrDB, err)
}
}
// Доп. колонка steps (этапы задачи). Idempotent.
if _, err := s.db.ExecContext(ctx,
`ALTER TABLE tasks ADD COLUMN steps TEXT NOT NULL DEFAULT ''`); err != nil {
if !isDuplicateColumn(err) {
return fmt.Errorf("%w: migrate add steps: %w", ErrDB, err)
}
}
return nil
}
@@ -185,4 +192,4 @@ func isDuplicateColumn(err error) bool {
// Now возвращает текущее время UTC как SQLiteTime.
func Now() SQLiteTime {
return SQLiteTime(time.Now().UTC())
}
}