Files
plantillas-proyectos/backend/alembic/versions/e4f5a6b7c8d9_add_incoterm_daf_legacy.py
2026-05-12 09:00:32 -06:00

31 lines
794 B
Python

"""add incoterm DAF legacy catalog row
Revision ID: e4f5a6b7c8d9
Revises: ca7d3c4e8b2a
Create Date: 2026-05-08
Incoterm histórico DAF (Delivered At Frontier) para CSV y referencias legacy.
"""
from typing import Sequence, Union
from alembic import op
revision: str = "e4f5a6b7c8d9"
down_revision: Union[str, None] = "ca7d3c4e8b2a"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.execute(
"""
INSERT INTO public.incoterms (code, description_es, description_en) VALUES
('DAF', 'ENTREGADO EN FRONTERA', 'DELIVERED AT FRONTIER')
ON CONFLICT (code) DO NOTHING;
"""
)
def downgrade() -> None:
op.execute("DELETE FROM public.incoterms WHERE code = 'DAF';")