A tool to analyze MySQL DDL statements and determine the online DDL algorithm (INSTANT, INPLACE, COPY) and lock types used during schema changes. It connects to a MySQL server, simulates DDL operations by creating temporary table copies, and reports the algorithm and lock strategy. Current version 1.0.12 is stable but in early development. Unlike general MySQL profiling tools, it focuses specifically on DDL impact, but requires a live MySQL connection and creates temporary tables, so it's intended for test environments only. The package ships TypeScript definitions.
npm install mysql-ddl-checkerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Analyze a MySQL DDL statement using the programmatic API, requires a configured online-ddl-check.json file in the project root.
Ensure a MySQL server is accessible and the configuration file 'online-ddl-check.json' is present with correct credentials.
Use a dedicated test database and avoid running on production. Clean up temporary tables manually if needed.
Check MySQL version before using. The package does not validate server compatibility.
Create the file in the root directory of your project or change working directory to project root before running.
Upgrade to Node.js 12+ (recommended 14+).
Create a file named 'online-ddl-check.json' in the project root with valid MySQL credentials.
Run 'npm install mysql2' to install the required database driver.
Use 'const checkDDL = require('mysql-ddl-checker').default;' instead of direct require.Verify the DDL syntax is correct for your MySQL version. Check for typos or unsupported operations.