diff options
| author | Dennis Fink | 2026-11-17 17:09:59 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-17 17:09:59 +0100 |
| commit | 6d6d079a3a99d3d3a922a640b6925eb2adf044de (patch) | |
| tree | 33cc19241f4ce86ea43b2f194087c58e3fdc8a4d /webmentions_ssg/migrations | |
| parent | 227092b57acc886469e16bcc4c0d3256e86d3d1e (diff) | |
| download | webmentions-ssg-6d6d079a3a99d3d3a922a640b6925eb2adf044de.tar.gz webmentions-ssg-6d6d079a3a99d3d3a922a640b6925eb2adf044de.zip | |
refactor(core)!: split forms and models by feature
Replace monolithic form and model modules with focused packages for
receiver, moderation, source, user, and shared validation concerns.
Rename source policy concepts to domain moderation, including routes,
models, tables, configuration, templates, and tests.
BREAKING CHANGE: form and model import paths, moderation routes, and
`SOURCE_ALLOWLIST_ENABLED` have changed; use `ALLOWLIST_ENABLED` and the
new feature-specific modules.
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/migrations/versions/a4f91c2e08d7_rename_source_lists_to_domain_lists.py | 28 | ||||
| -rw-r--r-- | webmentions_ssg/migrations/versions/d845aa7fbc19_portable_url_fingerprints.py | 4 |
2 files changed, 30 insertions, 2 deletions
diff --git a/webmentions_ssg/migrations/versions/a4f91c2e08d7_rename_source_lists_to_domain_lists.py b/webmentions_ssg/migrations/versions/a4f91c2e08d7_rename_source_lists_to_domain_lists.py new file mode 100644 index 0000000..e66dc70 --- /dev/null +++ b/webmentions_ssg/migrations/versions/a4f91c2e08d7_rename_source_lists_to_domain_lists.py @@ -0,0 +1,28 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink <me+coding@dennisfink.me> +# +# SPDX-License-Identifier: BSD-3-Clause + +"""Rename source block and allow lists to domain lists. + +Revision ID: a4f91c2e08d7 +Revises: b8179a2e46c3 +""" + +from alembic import op + +revision = "a4f91c2e08d7" +down_revision = "b8179a2e46c3" +branch_labels = None +depends_on = None + + +def upgrade() -> None: + """Preserve existing domain rules when renaming their tables.""" + op.rename_table("blocked_sources", "blocked_domains") + op.rename_table("allowed_sources", "allowed_domains") + + +def downgrade() -> None: + """Restore the former table names without deleting domain rules.""" + op.rename_table("allowed_domains", "allowed_sources") + op.rename_table("blocked_domains", "blocked_sources") diff --git a/webmentions_ssg/migrations/versions/d845aa7fbc19_portable_url_fingerprints.py b/webmentions_ssg/migrations/versions/d845aa7fbc19_portable_url_fingerprints.py index 8518b15..2917cb8 100644 --- a/webmentions_ssg/migrations/versions/d845aa7fbc19_portable_url_fingerprints.py +++ b/webmentions_ssg/migrations/versions/d845aa7fbc19_portable_url_fingerprints.py @@ -11,8 +11,8 @@ Revises: c0272f25ce17 import sqlalchemy as sa from alembic import op -from webmentions_ssg.models import source_target_digest as received_url_digest -from webmentions_ssg.models import target_digest as sent_target_digest +from webmentions_ssg.models.utils import source_target_digest as received_url_digest +from webmentions_ssg.models.utils import target_digest as sent_target_digest revision = "d845aa7fbc19" down_revision = "c0272f25ce17" |
