What's New - Margin Master

What's New

Stay up to date with the latest features, improvements, and fixes

What's New in Margin Master

Stay up to date with the latest features, improvements, and fixes.

MarginMaster v2026.715.22883 v2026.715.22883

July 15, 2026 17 changes
Improvement 2 items
  • Smart SQL Express instance detection and collision avoidance

    When Install-SQLExpress detects that the requested SQLEXPRESS instance already exists, it now determines ownership by checking for Margin Master database fingerprints. If the instance belongs to another application (contains non-Margin Master databases or is empty), the installer automatically selects a free instance name (MARGINMASTER, MMSQLEXPRESS, or MARGINMASTER2, etc.) and installs a dedicated Margin Master SQL Express 2025 instance side-by-side, leaving the existing instance completely untouched. If the instance is already SQL Server 2025 or newer, the installer recognizes that Margin Master can use it and exits successfully. If it's an older Margin Master instance, the installer directs users to run the upgrade script instead.

  • Separate Margin Master SQL instance installation when a foreign instance exists

    When an existing SQL Server instance is detected that isn't Margin Master's (for example, an ECi RockSolid POS instance occupying the conventional `SQLEXPRESS` name), Margin Master now installs its own separate, dedicated SQL Express instance under a distinct name (e.g., `MARGINMASTER` or `MMSQLEXPRESS`) rather than attempting to reuse or upgrade the existing one. A confirmation dialog explains the situation and lists the instance that will be left untouched. This ensures complete isolation between Margin Master's SQL Server and other applications' instances.

Bug Fix 4 items
  • Hard-block removal of non-Margin Master SQL instances

    Root cause: A Do-It-Best store running ECi RockSolid Classic POS had Margin Master update uninstall RockSolid's SQL Express instance (both apps install to the conventional .\SQLEXPRESS instance name), wiping the POS data. Fixed by implementing a database fingerprint system that inspects each instance's databases and only allows removal/upgrade when the instance is provably Margin Master's. Any instance containing a foreign database (e.g. RockSolid POS), no databases, or unreadable databases is hard-blocked with no override.

  • SQL instance ownership verification prevents accidental removal of other applications' databases

    A critical safety guard now prevents Margin Master from ever uninstalling, upgrading, or modifying a SQL Server instance that doesn't belong to it. The system inspects each instance's databases against a Margin Master fingerprint (at least 4 of 8 core tables: `About`, `mainTable`, `Store`, `RoundingScheme`, `RoundingSchemeDetail`, `SkuExceptions`, `MinimumMargins`, `GlobalFileConfig`) and blocks any operation on instances containing foreign databases, empty instances, or instances that can't be read. This prevents the regression where a RockSolid POS SQL Server instance could be accidentally removed during Margin Master maintenance.

  • PowerShell script compatibility restored for Windows PowerShell 5.1

    Replaced em-dash characters (—) with standard double-hyphens (--) throughout all PowerShell installation scripts. Windows PowerShell 5.1, which support technicians use during client installations, incorrectly decoded em-dashes in UTF-8 files as smart-quote characters, causing "Missing closing '}'" errors that prevented SQL Server installation and upgrade scripts from running. All scripts are now ASCII-only and parse correctly under both PowerShell 5.1 and PowerShell 7.

  • Application uninstaller refuses substring matches on generic SQL identifiers

    The `ApplicationUninstallerService` now maintains a blocklist of dangerously generic identifiers (`SQL`, `SQL Server`, `Microsoft SQL Server`, etc.) and refuses substring fallback matching for them. An uninstall request for "SQL Server" without an exact display name or product code now fails safe rather than potentially matching shared SQL components (ODBC, OLE DB, VSS Writer) or an unrelated application's SQL instance. Callers must supply a precise identifier for SQL-related removals.

Cloud Sync 1 item
  • SQL Express migration service ownership gates

    SqlExpressMigrationService now evaluates instance ownership before any upgrade or install operation. Foreign instances (those containing non-Margin Master databases or unreadable due to offline/permissions) trigger a new InstallSeparateInstance recommendation, causing Margin Master to install its own dedicated SQL instance (with a distinct name like MARGINMASTER or MMSQLEXPRESS) rather than touching the existing instance. The uninstall step re-verifies ownership immediately before running.

User Interface 2 items
  • Settings > Database Configuration now displays instance ownership status

    The Database Configuration > SQL Install tab now shows whether a detected SQL Server instance belongs to Margin Master or another application. Non-Margin-Master instances display a "NOT Margin Master (protected)" label, explain why they can't be modified (e.g., "Contains non-Margin-Master databases"), and list the foreign databases present. When a protected instance is detected and Margin Master needs SQL Server 2025, the UI offers to install a separate, dedicated Margin Master instance instead.

  • Settings screen SQL installation prompts

    Database Configuration tab (DatabaseConfigurationTab_SqlInstallViewModel) now shows a mandatory confirmation dialog when InstallSeparateInstance is recommended, explaining that a foreign SQL instance was detected and Margin Master will install its own separate instance without modifying the existing one. Installation cannot proceed without explicit support tech acknowledgment.

Database 2 items
  • Margin Master database fingerprint system

    Introduced MarginMasterDatabaseSignature in Common constants defining the canonical ownership test: a database is Margin Master's when it contains at least 4 of 8 core tables (About, mainTable, Store, RoundingScheme, RoundingSchemeDetail, SkuExceptions, MinimumMargins, GlobalFileConfig). Fleet-validated on 118 Margin Master databases across all vendors and POS systems (100% match rate, 0% false positives). Deliberately excludes AceCatalogRecords which is Ace-only and caused Do-It-Best databases to be misclassified.

  • Canonical Margin Master database fingerprint constant

    Introduced `MarginMaster.Common.Constants.MarginMasterDatabaseSignature`, the single source of truth for determining whether a SQL Server database belongs to Margin Master. A database matches the fingerprint when it contains at least 4 of 8 core tables (`About`, `mainTable`, `Store`, `RoundingScheme`, `RoundingSchemeDetail`, `SkuExceptions`, `MinimumMargins`, `GlobalFileConfig`). The fingerprint was derived from a fleet scan of 123 databases and deliberately excludes `AceCatalogRecords` (Ace-only; absent in Do it Best databases) to prevent misclassification. This constant is referenced by the C# discovery/migration services, the PowerShell support scripts, and comprehensive unit tests to lock the ownership logic.

Infrastructure 6 items
  • Database ownership fingerprint validation

    Added Get-InstanceOwnership function that inspects SQL instances to determine if they belong to Margin Master by checking for core database tables (About, mainTable, Store, RoundingScheme, RoundingSchemeDetail, SkuExceptions, MinimumMargins, GlobalFileConfig). An instance is considered owned by Margin Master only if it contains at least 4 of these 8 signature tables and no foreign databases. This mirrors the logic in MarginMaster.Common and ensures the installer fails safe—any doubt results in treating the instance as foreign.

  • Enhanced script validation process

    Identified gap in deployment validation where PowerShell 7 was used for syntax checking but failed to catch encoding issues that only appear in Windows PowerShell 5.1. All installation scripts have been validated to contain zero non-ASCII characters, ensuring compatibility with the PowerShell version actually used in the field.

  • Automatic free instance name selection

    Added Get-FreeInstanceName function that generates non-colliding SQL instance names for Margin Master installations. It tries MARGINMASTER first, then MMSQLEXPRESS, then numbered variations (MARGINMASTER2, MARGINMASTER3, etc.) until it finds an available name, ensuring that Margin Master's dedicated instance never overwrites another application's SQL Server installation.

  • Uninstall-SQLServer.ps1 ownership classifier

    Support script now classifies every discovered SQL instance as MarginMaster/Foreign/Empty/Unknown by connecting to each instance and checking databases against the signature. Only MarginMaster-owned instances are selectable for removal. Foreign instances (e.g. containing a RockSolidPOS database) are listed but hard-blocked from selection. Auto-select behavior removed entirely. Special detection for ECi RockSolid installation enhances warning messages.

  • Enhanced PowerShell support scripts with ownership guards

    The `Install-SQLExpress.ps1`, `Upgrade-SQLExpress.ps1`, and `Uninstall-SQLServer.ps1` support scripts now incorporate the same ownership verification logic as the application. The uninstall script now classifies every instance as `MarginMaster` (removable), `Foreign` (contains non-MM databases), `Empty` (no databases), or `Unknown` (offline/unreadable), and hard-blocks removal of protected instances with no override. The install and upgrade scripts refuse to modify an instance that isn't Margin Master's and offer alternative actions. All three scripts use the canonical `MarginMasterDatabaseSignature` constant to ensure they can never drift from the application's logic.

  • Application uninstaller service safety guards

    ApplicationUninstallerService now refuses substring matching on generic SQL identifiers (SQL, SQL Server, Microsoft SQL Server, SQL Express, Server, Microsoft) to prevent hitting shared SQL components or other applications' SQL instances. Only exact displayName or productCode matches are honored for these terms.

Connect with us

© 2026 Retailersoft, Inc. All rights reserved.

Loading...

Reconnecting to the server...

This usually takes a few seconds.