mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 05:30:46 +08:00
Move schema evolution to Alembic with auto-upgrade on API start.
Extract shared brownfield patches, add the legacy revision, and default to upgrade-head plus skip of duplicate inline DDL (with legacy fallback if Alembic fails). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
6e8003be5c
commit
57b3faf9fb
8 changed files with 503 additions and 343 deletions
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
## Runtime
|
||||
- Ensure PostgreSQL backup policy exists (daily logical backup + retention).
|
||||
- Prefer Alembic: see [docs/ALEMBIC.md](docs/ALEMBIC.md). After `alembic upgrade head`, set `NETX_SKIP_LEGACY_STARTUP_DDL=true`.
|
||||
- Schema: API auto-runs `alembic upgrade head` on start (see [docs/ALEMBIC.md](docs/ALEMBIC.md)). No manual migrate flag required for normal deploys.
|
||||
- Optional: `NETX_RUN_INLINE_SCHEDULERS=false` and run `python -m netx_api.worker` for collectors.
|
||||
- Run `oclaw` and `netx` under process managers (systemd/Windows service/pm2 equivalent).
|
||||
- Enable auto-restart and startup-at-boot for both services.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue