From 4e1a414b055d777f44168f5ec35ceef187e03bd3 Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Fri, 21 Aug 2026 02:39:00 +0200 Subject: [PATCH] =?UTF-8?q?fix(critical):=20migration=200134=20=E2=80=94?= =?UTF-8?q?=20notification=5Ftypes=20VARCHAR(20)=20too=20small,=20blocks?= =?UTF-8?q?=20ALL=20plugin=20activations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0134_notification_types_columns.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 alembic/versions/0134_notification_types_columns.py diff --git a/alembic/versions/0134_notification_types_columns.py b/alembic/versions/0134_notification_types_columns.py new file mode 100644 index 0000000..9947e25 --- /dev/null +++ b/alembic/versions/0134_notification_types_columns.py @@ -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);")