fix(critical): migration 0134 — notification_types VARCHAR(20) too small, blocks ALL plugin activations

This commit is contained in:
Agent Zero
2026-08-21 02:39:00 +02:00
parent c3c3089891
commit 4e1a414b05
@@ -0,0 +1,26 @@
"""Fix notification_types column sizes — VARCHAR(20) too small for values.
Revision ID: 0134
Revises: 0133
Create Date: 2026-08-21
"""
from alembic import op
revision = "0134"
down_revision = "0133"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.execute("ALTER TABLE notification_types ALTER COLUMN type_key TYPE VARCHAR(100);")
op.execute("ALTER TABLE notification_types ALTER COLUMN plugin_name TYPE VARCHAR(100);")
op.execute("ALTER TABLE notification_types ALTER COLUMN category TYPE VARCHAR(50);")
op.execute("ALTER TABLE notification_types ALTER COLUMN label TYPE VARCHAR(200);")
def downgrade() -> None:
op.execute("ALTER TABLE notification_types ALTER COLUMN label TYPE VARCHAR(200);")
op.execute("ALTER TABLE notification_types ALTER COLUMN category TYPE VARCHAR(20);")
op.execute("ALTER TABLE notification_types ALTER COLUMN plugin_name TYPE VARCHAR(20);")
op.execute("ALTER TABLE notification_types ALTER COLUMN type_key TYPE VARCHAR(20);")