# -*- coding: utf-8 -*- # Copyright 2026 Nexa Systems Inc. """Drop the redundant ``revision_number`` Integer column on fp.part.catalog. The model historically carried two revision fields: * ``revision`` (Char, required) — the customer's actual revision label * ``revision_number`` (Integer) — an internal counter The Integer counter duplicated information already in ``revision`` and got out of sync whenever the customer used a non-numeric scheme (A/B/C, A1/A2, "ECO-2024-014" etc.). This migration drops the column. ``action_create_revision`` and the auto-rev path on 3D-model upload now use ``_bump_revision_label`` which best-effort bumps the alphanumeric label and lets the user adjust to the customer's actual scheme. """ def migrate(cr, version): cr.execute(""" ALTER TABLE fp_part_catalog DROP COLUMN IF EXISTS revision_number; """)