SchemaQuench Walkthrough - MySQL (Enterprise)
End-to-end example: configure, deploy, review diffs, and validate the final state on MySQL.
Overview
This guide continues the walkthrough started with SchemaTongs and assumes you already have the extracted repository.
Step 1: Prerequisites & Setup
To begin, ensure access to a running MySQL 8.0 or higher server with the test product databases already created. If you do not have it, you can use this creation script.
Install SchemaQuench and configure the AppSettings.json file with the server, login
details, and the SchemaPackagePath pointed to the directory that contains your
Product.json file. The file should look something like:
{
"Target": {
"Server": "localhost",
"User": "TestUser",
"Password": "******************************",
"SecondaryServers": ""
},
"MaxThreads": 10,
"WhatIfONLY": false,
"SchemaPackagePath": "c:/temp/mysql/TestProduct"
}
Step 2: Make some changes
Navigate to C:\Temp\mysql\TestProduct\Templates\TestMain\Tables and edit
TestTable.json adding a column like:
{
...
"Columns": [
{
"Name": "MyNewColumn",
"DataType": "INT",
"Nullable": false,
"Default": "42",
"OldName": ""
},
{
"Name": "DateCreated",
"DataType": "DATETIME",
"Nullable": true,
"OldName": ""
},
,,,
}
We will also create a new stored procedure. Navigate to C:\Temp\mysql\TestProduct\Templates\TestSecondary\Functions
and create the file MyFunction.sql containing the following text:
CREATE FUNCTION IF NOT EXISTS `MyFunction`()
RETURNS INT
DETERMINISTIC
BEGIN
RETURN 42;
END;
Step 3: Run SchemaQuench and verify your changes
This is a console application, so it is recommended that you run from a command prompt. The need to create directories may require the command prompt to be opened in Administrator mode.
The tool will output progress to the console window. You should see something like the following to see that the changes occurred.
...
2025-11-09 15:29:36,069 - [localhost].[TestMain] Add New Physical Columns
2025-11-09 15:29:36,087 - [localhost].[TestMain] Add new physical columns to TestTable (MyNewColumn)
2025-11-09 15:29:36,090 - [localhost].[TestMain] Quenching object scripts without query tokens
...
2025-11-09 15:29:36,956 - [localhost].[TestSecondary] Quenching object scripts without unresolved tokens
2025-11-09 15:29:36,963 - [localhost].[TestSecondary] Quenched c:\temp\mysql\TestProduct\Templates\TestSecondary\Functions\MyFunction.sql
2025-11-09 15:29:36,963 - [localhost].[TestSecondary] Quenching missing tables and columns
...
2025-11-09 15:29:37,141 - [localhost].[TestSecondary] Successfully Quenched
2025-11-09 15:29:37,317 - Quenching After Product Scripts to localhost
2025-11-09 15:29:37,425 - Completed quench of TestProduct
If you run SchemaQuench again without any changes, you should not see the Adding new columns message, however, you will continue to see the quenching of the function as sql scripts are always applied.
Important
All sql scripts must be idempotent or later runs will fail.