You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
904 B
Python
38 lines
904 B
Python
"""fix request_log path column to TEXT
|
|
|
|
Revision ID: i0a1b2c3d4e5
|
|
Revises: h9b0c1d2e3f4
|
|
Create Date: 2026-04-13
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision: str = "i0a1b2c3d4e5"
|
|
down_revision: Union[str, Sequence[str], None] = "h9b0c1d2e3f4"
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# path stores the full URL (path + query string) and can exceed 500 chars
|
|
# for multi-ticker requests — widen to TEXT
|
|
op.alter_column(
|
|
"request_logs",
|
|
"path",
|
|
existing_type=sa.String(500),
|
|
type_=sa.Text(),
|
|
existing_nullable=True,
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.alter_column(
|
|
"request_logs",
|
|
"path",
|
|
existing_type=sa.Text(),
|
|
type_=sa.String(500),
|
|
existing_nullable=True,
|
|
)
|