diff --git a/app/db/migrations/versions/b613375d2fca_add_new_protocols_to_proxytypes_enum.py b/app/db/migrations/versions/b613375d2fca_add_new_protocols_to_proxytypes_enum.py index e03265a..7c2441b 100644 --- a/app/db/migrations/versions/b613375d2fca_add_new_protocols_to_proxytypes_enum.py +++ b/app/db/migrations/versions/b613375d2fca_add_new_protocols_to_proxytypes_enum.py @@ -23,7 +23,7 @@ def upgrade() -> None: op.execute("ALTER TYPE proxytypes ADD VALUE 'Shadowsocks2022'") op.execute("ALTER TYPE proxytypes ADD VALUE 'WireGuard'") op.execute("ALTER TYPE proxytypes ADD VALUE 'TUIC'") - elif dialect == "mysql": + elif dialect in ("mariadb", "mysql"): op.execute( "ALTER TABLE inbounds MODIFY protocol ENUM('VMess', 'VLESS', 'Trojan', 'Shadowsocks', 'Shadowsocks2022', 'Hysteria2', 'WireGuard', 'TUIC')" ) @@ -33,7 +33,7 @@ def downgrade() -> None: bind = op.get_bind() dialect = bind.dialect.name - if dialect == "mysql": + if dialect in ("mysql", "mariadb"): op.execute( "ALTER TABLE inbounds MODIFY protocol ENUM('VMess', 'VLESS', 'Shadowsocks', 'Trojan', 'Hysteria2')" )