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>
21 lines
524 B
Python
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")
|