Add installer/script delivery metadata to the core software model
AppVersion gains sha256 and silentargs so the endpoint update_app push can pin exact installer bytes and carry per-version silent switches; Application gains installersha256 for the app-level install source. New ShopDB-hosted script library (Script model plus scripts API) backs run_script delivery, with the body fetched by digest on push rather than pre-staged or sent over the command wire. Two idempotent migrations with real downgrades. Script added to the shopdb.api contract surface for plugin use.
This commit is contained in:
@@ -34,6 +34,11 @@ class Application(BaseModel):
|
||||
comment='Required on all PCs (drives the software-compliance report)'
|
||||
)
|
||||
image = db.Column(db.String(255))
|
||||
# Digest of the app-level uploaded installer (installpath). Lets the
|
||||
# endpoint update_app push resolve an install source by app alone, with no
|
||||
# AppVersion row: the agent fetches the pinned bytes and verifies this hash.
|
||||
# Stamped on package upload; null when installpath is a site share path.
|
||||
installersha256 = db.Column(db.String(64))
|
||||
|
||||
# Relationships
|
||||
supportteam = db.relationship('SupportTeam', back_populates='applications')
|
||||
@@ -70,6 +75,12 @@ class AppVersion(db.Model):
|
||||
notes = db.Column(db.String(255))
|
||||
dateadded = db.Column(db.DateTime, default=_utcnow)
|
||||
isactive = db.Column(db.Boolean, default=True)
|
||||
# Delivery metadata for the endpoint installer push. sha256 pins the exact
|
||||
# bytes the agent must fetch (warn-not-block for now; hardened later);
|
||||
# silentargs carries this version's unattended-install switches because
|
||||
# homegrown EXEs vary by developer (MSI is uniform via msiexec).
|
||||
sha256 = db.Column(db.String(64))
|
||||
silentargs = db.Column(db.String(255))
|
||||
|
||||
# Relationships
|
||||
application = db.relationship('Application', back_populates='versions')
|
||||
@@ -88,7 +99,9 @@ class AppVersion(db.Model):
|
||||
'releasedate': self.releasedate.isoformat() if self.releasedate else None,
|
||||
'notes': self.notes,
|
||||
'dateadded': self.dateadded.isoformat() + 'Z' if self.dateadded else None,
|
||||
'isactive': self.isactive
|
||||
'isactive': self.isactive,
|
||||
'sha256': self.sha256,
|
||||
'silentargs': self.silentargs
|
||||
}
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
Reference in New Issue
Block a user