Files
QuoteForge/bible-local/07-dev.md
T
Mikhail ChusavitinandClaude Opus 5.5 a2a1904d91 feat: make migrate — серверные SQL-миграции вместо AutoMigrate
`qfs -migrate` теперь применяет только migrations/*.sql (встроены в бинарник)
с учётом в qt_schema_migrations и завершается, не запуская приложение.
Новые команды: make migrate-status (read-only список applied/pending),
make migrate, make migrate-baseline UPTO=<file> (пометить как применённые
без выполнения). migrate отказывается работать, если в истории нет ни одной
применённой миграции — иначе все файлы пошли бы заново.

Удалён GORM AutoMigrate против MariaDB (models.Migrate, SeedCategories):
устаревший бинарник v1.18 с -migrate прогнал по боевой базе AutoMigrate
своих моделей. Миграции идут через отдельное соединение без read/write
таймаутов — 3s-таймаут sync-соединения обрывал backfill в 032.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:21:53 +03:00

37 lines
953 B
Markdown

# 07 - Development
## Common commands
```bash
go run ./cmd/qfs
make migrate-status # server SQL migrations: applied/pending
make migrate # apply pending server SQL migrations
go run ./cmd/migrate_project_updated_at
go test ./...
go vet ./...
make build-release
make install-hooks
```
## Guardrails
- run `gofmt` before commit;
- use `slog` for server logging;
- keep runtime business logic SQLite-only;
- limit MariaDB access to sync, setup, and migration tooling;
- keep `config.yaml` out of git and use `config.example.yaml` only as a template;
- update `bible-local/` in the same commit as architecture changes.
## Removed features that must not return
- admin pricing UI/API;
- alerts and notification workflows;
- stock import tooling;
- cron jobs;
- standalone importer utility.
## Release notes
Release history belongs under `releases/<version>/RELEASE_NOTES.md`.
Do not keep temporary change summaries in the repository root.