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:
45
migrations/versions/7d15_warranties.py
Normal file
45
migrations/versions/7d15_warranties.py
Normal file
@@ -0,0 +1,45 @@
|
||||
"""Warranty plugin: warranties + warrantyassets
|
||||
|
||||
Revision ID: 7d15_warranties
|
||||
Revises: 7d14_customfields
|
||||
Create Date: 2026-07-09
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = '7d15_warranties'
|
||||
down_revision = '7d14_customfields'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
'warranties',
|
||||
sa.Column('warrantyid', sa.Integer(), primary_key=True),
|
||||
sa.Column('vendor', sa.String(length=100), nullable=False),
|
||||
sa.Column('servicetag', sa.String(length=100), nullable=True),
|
||||
sa.Column('provider', sa.String(length=20), nullable=False, server_default='manual'),
|
||||
sa.Column('servicelevel', sa.String(length=150), nullable=True),
|
||||
sa.Column('startdate', sa.Date(), nullable=True),
|
||||
sa.Column('enddate', sa.Date(), nullable=True),
|
||||
sa.Column('lastcheckeddate', sa.DateTime(), nullable=True),
|
||||
sa.Column('notes', sa.Text(), nullable=True),
|
||||
sa.Column('isactive', sa.Boolean(), nullable=False, server_default='1'),
|
||||
)
|
||||
op.create_table(
|
||||
'warrantyassets',
|
||||
sa.Column('id', sa.Integer(), primary_key=True),
|
||||
sa.Column('warrantyid', sa.Integer(), nullable=False),
|
||||
sa.Column('assetid', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['warrantyid'], ['warranties.warrantyid'], ondelete='CASCADE'),
|
||||
sa.ForeignKeyConstraint(['assetid'], ['assets.assetid'], ondelete='CASCADE'),
|
||||
sa.UniqueConstraint('warrantyid', 'assetid', name='uq_warrantyasset_warranty_asset'),
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_table('warrantyassets')
|
||||
op.drop_table('warranties')
|
||||
Reference in New Issue
Block a user