Initial import: shopdb-flask multi-site asset platform
Flask + Vue rewrite of the classic-ASP shopdb, built as a plugin framework so sister GE Aerospace sites can adopt it. Product version 0.7.0-pre-0.8.0, plugin contract 0.11.0, 966 backend tests. Key entry points: - docs/INSTALL-WINDOWS-IIS.md - tested Windows + IIS install runbook (own-site and subpath deployment methods) - docs/PILOT-DEPLOY.md - production pilot: stand up + import + verify - docs/IMPORT-API.md - schema-agnostic legacy data import contract - scripts/site_imports/wjf/ - West Jefferson reference import loader - docs/adr/ - twelve accepted architecture decision records
This commit is contained in:
44
migrations/versions/7b02_gaugelabreference.py
Normal file
44
migrations/versions/7b02_gaugelabreference.py
Normal file
@@ -0,0 +1,44 @@
|
||||
"""Add Asset.gaugelabreference and Asset.maintenancereference
|
||||
|
||||
Adds dedicated external-reference columns to assets, distinct from
|
||||
assetnumber. Equipment commonly carries an authoritative gauge lab reference
|
||||
and a maintenance system reference; assetnumber stays the generic asset tag
|
||||
and name the layperson label.
|
||||
|
||||
Revision ID: 7b02_gaugelabref
|
||||
Revises: 7a01_adr001_position
|
||||
Create Date: 2026-06-25
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = '7b02_gaugelabref'
|
||||
down_revision = '7a01_adr001_position'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
with op.batch_alter_table('assets') as batch_op:
|
||||
batch_op.add_column(sa.Column(
|
||||
'gaugelabreference', sa.String(length=50), nullable=True,
|
||||
comment='Gauge lab asset reference (authoritative tag the gauge '
|
||||
'lab assigns to equipment); distinct from assetnumber'))
|
||||
batch_op.add_column(sa.Column(
|
||||
'maintenancereference', sa.String(length=50), nullable=True,
|
||||
comment='Maintenance system asset reference; distinct from '
|
||||
'assetnumber'))
|
||||
batch_op.create_index('ix_assets_gaugelabreference',
|
||||
['gaugelabreference'])
|
||||
batch_op.create_index('ix_assets_maintenancereference',
|
||||
['maintenancereference'])
|
||||
|
||||
|
||||
def downgrade():
|
||||
with op.batch_alter_table('assets') as batch_op:
|
||||
batch_op.drop_index('ix_assets_maintenancereference')
|
||||
batch_op.drop_index('ix_assets_gaugelabreference')
|
||||
batch_op.drop_column('maintenancereference')
|
||||
batch_op.drop_column('gaugelabreference')
|
||||
Reference in New Issue
Block a user