Fix software-compliance report + relationshiptypes zero-dates
- 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>
This commit is contained in:
29
migrations/versions/7c02_application_isrequired.py
Normal file
29
migrations/versions/7c02_application_isrequired.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""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')
|
||||
Reference in New Issue
Block a user