printedparts: gage-lab asset tag + print-files redesign
The gage lab assigns real WJRP asset numbers: internal itemcode stays auto-minted, a new optional unique gagelabtag carries the lab's number, searchable and kiosk-resolved (scans and bare digits against either identifier). Print files render as stacked revision cards instead of a scrolling table.
This commit is contained in:
27
plugins/printedparts/migrations/versions/0003_gagelabtag.py
Normal file
27
plugins/printedparts/migrations/versions/0003_gagelabtag.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""Add printeditems.gagelabtag: the gage-lab assigned asset tag.
|
||||
|
||||
The gage lab issues WJRP asset numbers for printed parts; the internal
|
||||
itemcode stays auto-generated, and this optional unique tag carries the
|
||||
lab's number. The kiosk resolves scans/typed digits against both.
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'printedparts0003gagetag'
|
||||
down_revision = 'printedparts0002files'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column('printeditems',
|
||||
sa.Column('gagelabtag', sa.String(length=50), nullable=True))
|
||||
op.create_index('ix_printeditems_gagelabtag', 'printeditems',
|
||||
['gagelabtag'], unique=True)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_index('ix_printeditems_gagelabtag', table_name='printeditems')
|
||||
op.drop_column('printeditems', 'gagelabtag')
|
||||
Reference in New Issue
Block a user