{"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.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install meadow-migrationmanager"],"cli":{"name":"meadow","version":null}},"imports":["const MeadowMigrationManager = require('meadow-migrationmanager');","const tmpManager = new MeadowMigrationManager({}); const schemaLib = tmpManager.instantiateServiceProvider('SchemaLibrary');","const tmpManager = new MeadowMigrationManager({}); const stricture = tmpManager.instantiateServiceProvider('StrictureAdapter');","const tmpManager = new MeadowMigrationManager({}); const connLib = tmpManager.instantiateServiceProvider('ConnectionLibrary');"],"auth":{"required":false,"env_vars":[]},"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}