diff options
| author | Dennis Fink | 2026-11-16 16:21:51 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-16 16:21:51 +0100 |
| commit | 09353e2fd7a66987076f33f65ac4f0fc8831e887 (patch) | |
| tree | 3b2aea952518022a4cd57268b86cf73507ab3440 /webmentions_ssg/cli.py | |
| parent | 335c27571fa1856a6b775ff51d69d1590273a965 (diff) | |
| download | webmentions-ssg-09353e2fd7a66987076f33f65ac4f0fc8831e887.tar.gz webmentions-ssg-09353e2fd7a66987076f33f65ac4f0fc8831e887.zip | |
fix(core): restrict migrate CLI to development
Hide Flask-Migrate's unrestricted command group unless
`WEBMENTIONS_SSG_DEV` is enabled, while keeping the guarded database
management commands available.
Base migration CLI exposure on the development environment flag rather
than the selected configuration class.
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/cli.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webmentions_ssg/cli.py b/webmentions_ssg/cli.py index 3448bbb..b26b35b 100644 --- a/webmentions_ssg/cli.py +++ b/webmentions_ssg/cli.py @@ -196,8 +196,8 @@ def upgrade_db() -> None: raise click.ClickException( "No Flask-Migrate revision table found. " "For a new, empty database run 'flask db create-db'. " - "For a legacy database, inspect its schema and use " - "'flask migrate stamp' only if appropriate." + "For a legacy database, inspect its schema and stamp its revision " + "only if appropriate (the 'flask migrate' CLI is development-only)." ) migrate_upgrade() |
