PrintedItem (catalog: code, name, image, cached quantityonhand, per-item threshold, bin) and PrintedItemTransaction (the ledger: signed quantity change attributed to a badge-resolved employee). Both registered in PLUGIN_TABLE_OWNERS; 0001 is a post-cutover real baseline. The migration-guard test learns the new expected head. Routes are a placeholder ping until the next stage - the scaffold's list route imported the deleted scaffold model, which surfaces as an empty 'Migration error' because the alembic env imports the models package.
15 lines
513 B
Python
15 lines
513 B
Python
"""Alembic environment for the printedparts plugin migration chain.
|
|
|
|
Delegates to the shared runner in shopdb.plugins.alembic_template, which
|
|
filters the metadata to this plugin's tables and drives Alembic against the
|
|
per-plugin version table alembic_version_printedparts (ADR-008). This plugin
|
|
is NEW (post-cutover): its 0001 baseline really CREATES its tables.
|
|
"""
|
|
import os
|
|
|
|
os.environ['PLUGIN_NAME'] = 'printedparts'
|
|
|
|
from shopdb.plugins.alembic_template import run_migrations # noqa: E402
|
|
|
|
run_migrations()
|