SchemaSmith Documentation

Product Definition — MySQL (Enterprise)

MySQL-specific product configuration, schema identification, and validation patterns.

SchemaSmith Product.json configuration for MySQL Enterprise database schema management.

Overview

Product.json is the entry point for a schema package on MySQL. For the full field reference, validation script chain, template ordering rules, and version stamp behavior that apply across all platforms, see Products & Templates.

MySQL Enterprise shares the same Product.json fields as all Enterprise platforms. This page shows the MySQL-specific validation pattern, the SchemaIdentificationScript property name difference, and example configuration.

MySQL Example

From the SchemaSmith MySQL Enterprise Demos, a product with product-level script folders:

{
  "Name": "ValidProduct",
  "ValidationScript": "SELECT CAST(CASE WHEN EXISTS(SELECT * FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '{{MainDB}}') THEN 1 ELSE 0 END AS UNSIGNED)",
  "TemplateOrder": ["Main", "Secondary", "Bogus"],
  "ScriptFolders": [
    { "FolderPath": "Jobs", "QuenchSlot": "After" }
  ],
  "ScriptTokens": {
    "SecondaryDB": "TestSecondary",
    "MainDB": "TestMain",
    "ReleaseVersion": "1.0.1.14",
    "TestQueryToken": "<*Query*>SELECT GROUP_CONCAT(SCHEMA_NAME SEPARATOR ',') FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '{{MainDB}}'"
  }
}

MySQL Validation

MySQL products validate against information_schema.SCHEMATA to confirm the target schema exists. The result must be a single row with a value that compares equal to 1 (BIT, INT, or any compatible type). Token references like {{MainDB}} are resolved from script tokens before execution.

MySQL uses SchemaIdentificationScript on templates instead of DatabaseIdentificationScript used by other platforms. See Templates for details.