Files
GTI_GERENCIADOR_FISCAL/central/alembic/versions/0025_tenant_external_cnpj.py
T
gtiandClaude Sonnet 5 9f9e06e9e9 fix: searchable client combobox in Nova instalação
Replaces the native list with a combobox (name/code/CNPJ search, accent- and
case-insensitive, keyboard + mouse, custom dropdown, hidden client_id = the
Gerenciador's real CLIENTE.ID). The backend resolves client_id against the
active GTI_GERENCIADOR mirror and rejects free text/unknown ids. Adds
Tenant.external_cnpj (migration 0025) mirrored via the internal endpoint.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-24 08:12:52 -03:00

21 lines
524 B
Python

"""Tenant.external_cnpj (digits) mirrored from GTI Gerenciador for the client selector search.
Revision ID: 0025_tenant_external_cnpj
Revises: 0024_tenant_gerenciador_mirror
"""
from alembic import op
import sqlalchemy as sa
revision = "0025_tenant_external_cnpj"
down_revision = "0024_tenant_gerenciador_mirror"
branch_labels = None
depends_on = None
def upgrade():
op.add_column("tenants", sa.Column("external_cnpj", sa.String(20), nullable=True))
def downgrade():
op.drop_column("tenants", "external_cnpj")