Gage-lab instruments as Asset extensions: measuringtooltypes (color-coded lookup) + measuringtools (calibration interval/dates, provider, notes) with calibration status derived at read time (overdue / due soon / current / unknown), never stored. Full CRUD API with permission-gated writes, types management with in-use guard, calibration report, nav/reports/config-schema hooks, and a complete frontend (list/detail/form, types settings page, calibration report page, gated routes per ADR-009). First plugin whose migration chain really creates tables post-cutover (ADR-008), and the working example for docs/PLUGIN-GUIDE.md - a 12-section walkthrough of building a plugin on this framework, linked from PLUGIN-QUICKSTART and PLUGINS. Verified: full suite 323 passing, live E2E on all four pages, fresh scratch-MySQL migration dry-run green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
17 lines
634 B
Python
17 lines
634 B
Python
"""Alembic environment for the measuring-tools 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_measuringtools. See ADR-008 for the ownership
|
|
model. Unlike the ten cutover plugins whose 0001 is a no-op anchor, this plugin
|
|
is NEW: its 0001 baseline really CREATES its tables, because the core chain
|
|
never built them.
|
|
"""
|
|
import os
|
|
|
|
os.environ['PLUGIN_NAME'] = 'measuringtools'
|
|
|
|
from shopdb.plugins.alembic_template import run_migrations # noqa: E402
|
|
|
|
run_migrations()
|