feat(customers): add controlled CSV and XLSX customer import

This commit is contained in:
Schubert Ferenc 2026-07-12 15:19:15 +02:00
parent 613ffdc8b7
commit 82e03877b3
566 changed files with 2752 additions and 991 deletions

View file

@ -0,0 +1,38 @@
"""customer external reference
Revision ID: 202607120003
Revises: 202607120002
Create Date: 2026-07-12 14:00:00.000000
"""
from __future__ import annotations
from alembic import op
import sqlalchemy as sa
revision = "202607120003"
down_revision = "202607120002"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.add_column("customers", sa.Column("source_system", sa.String(length=80), nullable=True))
op.add_column("customers", sa.Column("external_id", sa.String(length=120), nullable=True))
op.create_index(op.f("ix_customers_source_system"), "customers", ["source_system"], unique=False)
op.create_index(op.f("ix_customers_external_id"), "customers", ["external_id"], unique=False)
op.create_index(
"ix_customers_source_system_external_id",
"customers",
["source_system", "external_id"],
unique=False,
)
def downgrade() -> None:
op.drop_index("ix_customers_source_system_external_id", table_name="customers")
op.drop_index(op.f("ix_customers_external_id"), table_name="customers")
op.drop_index(op.f("ix_customers_source_system"), table_name="customers")
op.drop_column("customers", "external_id")
op.drop_column("customers", "source_system")