Реализован интерфейс согласий
This commit is contained in:
@@ -30,6 +30,11 @@ SEED = {
|
||||
True,
|
||||
),
|
||||
"consent.personal_data.version": ("2026-06-10", "string", True),
|
||||
"consent.privacy_policy.document_url": (
|
||||
"https://www.han0107.ru/privacy",
|
||||
"string",
|
||||
True,
|
||||
),
|
||||
"consent.user_agreement.required": ("true", "boolean", True),
|
||||
"consent.user_agreement.document_url": (
|
||||
"https://www.han0107.ru/user-agreement",
|
||||
@@ -38,6 +43,11 @@ SEED = {
|
||||
),
|
||||
"consent.user_agreement.version": ("2026-06-10", "string", True),
|
||||
"consent.marketing.required": ("false", "boolean", True),
|
||||
"consent.marketing.document_url": (
|
||||
"https://www.han0107.ru/privacy/ads-agree",
|
||||
"string",
|
||||
True,
|
||||
),
|
||||
"consent.marketing.version": ("2026-06-10", "string", True),
|
||||
"chat.attachments.allowed_extensions": (
|
||||
"jpg,jpeg,png,webp,heic,heif,pdf",
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
"""Seed consent.privacy_policy.document_url for personal_data consent UI.
|
||||
|
||||
Revision ID: 0006_privacy_policy
|
||||
Revises: 0005_otp_settings
|
||||
Create Date: 2026-07-23
|
||||
"""
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
from alembic import op
|
||||
|
||||
revision: str = "0006_privacy_policy"
|
||||
down_revision: str | None = "0005_otp_settings"
|
||||
branch_labels: str | Sequence[str] | None = None
|
||||
depends_on: str | Sequence[str] | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.execute(
|
||||
"""
|
||||
INSERT INTO han_app.app_settings
|
||||
(setting_key, setting_value, value_type, is_public, description,
|
||||
record_status, updated_at)
|
||||
VALUES
|
||||
('consent.privacy_policy.document_url',
|
||||
'https://www.han0107.ru/privacy', 'string', true,
|
||||
'Privacy policy URL shown next to personal_data consent', 'A', now())
|
||||
ON CONFLICT (setting_key) DO NOTHING
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
raise RuntimeError("Privacy policy consent URL migration is forward-only")
|
||||
@@ -0,0 +1,34 @@
|
||||
"""Seed consent.marketing.document_url for marketing consent UI link.
|
||||
|
||||
Revision ID: 0007_marketing_doc
|
||||
Revises: 0006_privacy_policy
|
||||
Create Date: 2026-07-23
|
||||
"""
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
from alembic import op
|
||||
|
||||
revision: str = "0007_marketing_doc"
|
||||
down_revision: str | None = "0006_privacy_policy"
|
||||
branch_labels: str | Sequence[str] | None = None
|
||||
depends_on: str | Sequence[str] | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.execute(
|
||||
"""
|
||||
INSERT INTO han_app.app_settings
|
||||
(setting_key, setting_value, value_type, is_public, description,
|
||||
record_status, updated_at)
|
||||
VALUES
|
||||
('consent.marketing.document_url',
|
||||
'https://www.han0107.ru/privacy/ads-agree', 'string', true,
|
||||
'Marketing communications consent document URL', 'A', now())
|
||||
ON CONFLICT (setting_key) DO NOTHING
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
raise RuntimeError("Marketing consent document URL migration is forward-only")
|
||||
Reference in New Issue
Block a user