mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: Extend sys_logs user_agent column length to support DingTalk agent (#1170)
The DingTalk agent sends user_agent strings that exceed the previous 255-character limit, causing log entries to be silently dropped. Increase the column to VARCHAR(500).
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""068_alter_sys_logs_user_agent_length
|
||||
|
||||
Revision ID: a1b2c3d4e5f6
|
||||
Revises: e51127e9aa4a
|
||||
Create Date: 2026-06-09 00:00:00.000000
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'a1b2c3d4e5f6'
|
||||
down_revision = 'e51127e9aa4a'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column('sys_logs', 'user_agent',
|
||||
existing_type=sa.VARCHAR(length=255),
|
||||
type_=sa.VARCHAR(length=500),
|
||||
existing_nullable=True)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.alter_column('sys_logs', 'user_agent',
|
||||
existing_type=sa.VARCHAR(length=500),
|
||||
type_=sa.VARCHAR(length=255),
|
||||
existing_nullable=True)
|
||||
Reference in New Issue
Block a user