feature/alembic-daf

This commit is contained in:
2026-05-12 09:00:32 -06:00
parent b0ce6c8a5a
commit ee9ac4f64f
19 changed files with 1203 additions and 717 deletions

View File

@@ -0,0 +1,30 @@
"""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';")