{"id":18540,"library":"meadow-migrationmanager","title":"Meadow Migration Manager","description":"Meadow Migration Manager is a CLI, Web, and Terminal UI tool for managing database schema migrations within the Meadow ecosystem. As of version 0.0.13, it supports MySQL, PostgreSQL, MSSQL, and SQLite through pluggable providers. It provides a complete pipeline from MicroDDL schema definition via Stricture compilation, diffing between schema versions, SQL migration generation for target dialects, and live database deployment. Key differentiators include a multi-interface approach (CLI with 11 commands, blessed-based TUI, and interactive flow diagrams) and deep integration with Meadow data access libraries.","status":"active","version":"0.0.13","language":"javascript","source_language":"en","source_url":"https://github.com/stevenvelozo/meadow-migrationmanager","tags":["javascript","meadow","migration","schema","database","ddl"],"install":[{"cmd":"npm install meadow-migrationmanager","lang":"bash","label":"npm"},{"cmd":"yarn add meadow-migrationmanager","lang":"bash","label":"yarn"},{"cmd":"pnpm add meadow-migrationmanager","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"MicroDDL compiler and schema toolchain required for DDL compilation","package":"stricture","optional":false},{"reason":"Data access library for database operations","package":"meadow","optional":true},{"reason":"Query DSL for SQL generation used in migration scripts","package":"foxhound","optional":true},{"reason":"Interactive flow visualization with foreign key relationship mapping","package":"pict-section-flow","optional":true}],"imports":[{"note":"This package does not ship ES module exports; use CommonJS require.","wrong":"import MeadowMigrationManager from 'meadow-migrationmanager';","symbol":"MeadowMigrationManager","correct":"const MeadowMigrationManager = require('meadow-migrationmanager');"},{"note":"Service providers are accessed via instantiateServiceProvider method, not direct exports.","wrong":"const { SchemaLibrary } = require('meadow-migrationmanager');","symbol":"SchemaLibrary","correct":"const tmpManager = new MeadowMigrationManager({}); const schemaLib = tmpManager.instantiateServiceProvider('SchemaLibrary');"},{"note":"Same as SchemaLibrary; use the factory method.","wrong":"const { StrictureAdapter } = require('meadow-migrationmanager');","symbol":"StrictureAdapter","correct":"const tmpManager = new MeadowMigrationManager({}); const stricture = tmpManager.instantiateServiceProvider('StrictureAdapter');"},{"note":"Access via instantiateServiceProvider with the string 'ConnectionLibrary'.","wrong":"","symbol":"ConnectionLibrary","correct":"const tmpManager = new MeadowMigrationManager({}); const connLib = tmpManager.instantiateServiceProvider('ConnectionLibrary');"}],"quickstart":{"code":"const MeadowMigrationManager = require('meadow-migrationmanager');\n\n// Instantiate the manager with optional configuration\nconst tmpManager = new MeadowMigrationManager({});\n\n// Access the schema library service\nconst schemaLib = tmpManager.instantiateServiceProvider('SchemaLibrary');\n\n// Add a MicroDDL schema from a string\nschemaLib.addSchema('bookstore', '!Book\\n@IDBook\\n$Title 200\\n$Genre 128\\n');\n\n// Compile the DDL via Stricture\nconst stricture = tmpManager.instantiateServiceProvider('StrictureAdapter');\nstricture.compileDDL(schemaLib.getSchema('bookstore').DDL, (pError, pSchema) => {\n  if (pError) {\n    console.error('Compilation error:', pError);\n    return;\n  }\n  console.log('Compiled tables:', Object.keys(pSchema.Tables));\n});\n\n// Add a second version and diff\nschemaLib.addSchema('bookstore-v2', '!Book\\n@IDBook\\n$Title 256\\n$Genre 64\\n$Price 10,2\\n');\nstricture.compileDDL(schemaLib.getSchema('bookstore-v2').DDL, (err2, schema2) => {\n  if (!err2) {\n    const diff = tmpManager.instantiateServiceProvider('DiffEngine');\n    diff.diffSchema(schemaLib.getSchema('bookstore'), schemaLib.getSchema('bookstore-v2'), (dErr, dResult) => {\n      console.log('Added tables:', dResult.Added);\n      console.log('Removed tables:', dResult.Removed);\n      console.log('Modified tables:', dResult.Modified);\n    });\n  }\n});\n","lang":"javascript","description":"Demonstrates schema creation, DDL compilation, and basic diffing between two schema versions using the programmatic API."},"warnings":[{"fix":"Always create a MeadowMigrationManager instance first and use its method to obtain service instances.","message":"Service providers are accessed via `instantiateServiceProvider` method, not as named exports from the package.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Use JavaScript or manually create TypeScript declaration files if type safety is required.","message":"The package does not provide TypeScript type definitions; all APIs are dynamically typed.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Configure a persistent storage backend via the configuration object when instantiating MeadowMigrationManager.","message":"Database connections and schema library data are stored in-memory and not persisted unless explicitly configured with a storage provider.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use `const MeadowMigrationManager = require('meadow-migrationmanager');` instead of `import`.","cause":"Using ES module import syntax which is not supported; the package only exports a CommonJS module.","error":"TypeError: MeadowMigrationManager is not a constructor"},{"fix":"Install the missing dependency: `npm install stricture`.","cause":"Missing peer dependency stricture which is required for DDL compilation.","error":"Cannot find module 'stricture'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}