Files
shopdb-flask/migrations/versions/7d01_dashboarddefaults.py
Cam Proudlock a9d0dfff4a 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
2026-07-14 07:58:51 -04:00

38 lines
1.2 KiB
Python

"""Add dashboarddefaults (visitor-IP -> business-unit mapping)
A shopfloor / lobby kiosk resolves which business unit to display from the
display PC's IP. Powers the visitor-location lookup.
Revision ID: 7d01_dashboarddefaults
Revises: 7c04_fold_plugin_schema
Create Date: 2026-06-27
"""
from alembic import op
import sqlalchemy as sa
revision = '7d01_dashboarddefaults'
down_revision = '7c04_fold_plugin_schema'
branch_labels = None
depends_on = None
def upgrade():
op.create_table(
'dashboarddefaults',
sa.Column('dashboarddefaultid', sa.Integer(), primary_key=True),
sa.Column('ipaddress', sa.String(length=50), nullable=False, unique=True),
sa.Column('businessunitid', sa.Integer(), nullable=False),
sa.Column('description', sa.String(length=255), nullable=True),
sa.Column('createddate', sa.DateTime(), nullable=True),
sa.Column('modifieddate', sa.DateTime(), nullable=True),
sa.Column('isactive', sa.Boolean(), nullable=True),
sa.ForeignKeyConstraint(['businessunitid'], ['businessunits.businessunitid'],
name='fk_dashboarddefaults_businessunit'),
)
def downgrade():
op.drop_table('dashboarddefaults')