- Add applications.isrequired (model + migration 7c02 + create/update + form checkbox). The software-compliance report compared required apps against installs but no such flag existed, so it 500'd; now it works. - Repair relationshiptypes rows with 0000-00-00 createddate/modifieddate (partof/connectedto) to real timestamps. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
30 lines
744 B
Python
30 lines
744 B
Python
"""Add applications.isrequired
|
|
|
|
Backs the software-compliance report, which compares required applications
|
|
against what is installed per PC. There was no such flag before, so the report
|
|
errored.
|
|
|
|
Revision ID: 7c02_app_isrequired
|
|
Revises: 7c01_drop_legacy_machine
|
|
Create Date: 2026-06-26
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
revision = '7c02_app_isrequired'
|
|
down_revision = '7c01_drop_legacy_machine'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
op.add_column('applications', sa.Column(
|
|
'isrequired', sa.Boolean(), nullable=True, server_default=sa.false(),
|
|
comment='Required on all PCs (drives the software-compliance report)'))
|
|
|
|
|
|
def downgrade():
|
|
op.drop_column('applications', 'isrequired')
|