{"id":49310,"library":"sequelize-auto-migration","title":"Sequelize Auto Migration","description":"An auto-migration and seeder tool for ElectronJs and Node.js applications using Sequelize ORM with relational databases (MSSQL, PostgreSQL, SQLite3). Version 0.0.7 (latest) provides a simple API to automate schema migration and seeding by passing a Sequelize instance and file paths. It stores completed migrations in SequelizeMeta table and seeders in SequelizeData, mirroring sequelize-cli. The tool is lightweight and integrates with Electron's main process, but lacks active maintenance—last updated in 2020, with unaddressed issues and no TypeScript support. Compared to sequelize-cli, it offers a programmatic alternative without CLI commands.","status":"abandoned","version":"0.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/medaamarnadh/sequelize-migration","tags":["javascript","ElectronJs","sequelize","auto","migration","sequelize-auto-migration","sequelize auto migration"],"install":[{"cmd":"npm install sequelize-auto-migration","lang":"bash","label":"npm"},{"cmd":"yarn add sequelize-auto-migration","lang":"bash","label":"yarn"},{"cmd":"pnpm add sequelize-auto-migration","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for database ORM operations","package":"sequelize","optional":false},{"reason":"Used for control flow (e.g., async.waterfall)","package":"async","optional":false}],"imports":[{"note":"Package exports a function that takes the models object and returns an instance. ESM import will fail; it is CJS-only.","wrong":"import SequelizeAuto from 'sequelize-auto-migration';","symbol":"default","correct":"const SequelizeAuto = require('sequelize-auto-migration')(models);"},{"note":"config() is async and must be awaited. Returns a promise.","wrong":"SequelizeAuto.config({ migrationPath: './migrations' });","symbol":"config","correct":"await SequelizeAuto.config({ migrationPath: './migrations', seedPath: './seeders' });"},{"note":"migrate() uses callback pattern; does not return a promise. Use async.waterfall or promisify.","wrong":"const result = await SequelizeAuto.migrate();","symbol":"migrate","correct":"SequelizeAuto.migrate(callback);"}],"quickstart":{"code":"const Sequelize = require('sequelize');\nconst models = require('./models');\nconst SequelizeAuto = require('sequelize-auto-migration')(models);\nconst path = require('path');\n\nasync function runMigration() {\n  await SequelizeAuto.config({\n    migrationPath: path.resolve('./migrations'),\n    seedPath: path.resolve('./seeders')\n  });\n\n  SequelizeAuto.migrate(function(err, result) {\n    if (err) {\n      console.log('Migration error:', err);\n    } else {\n      console.log('Migration successful');\n      SequelizeAuto.migrationSeed(function(err, result) {\n        if (err) {\n          console.log('Seed error:', err);\n        } else {\n          console.log('All migrations and seeds completed');\n        }\n      });\n    }\n  });\n}\n\nrunMigration().catch(console.error);","lang":"javascript","description":"Shows basic usage: import with models, configure paths, run migration and seeding using callbacks."},"warnings":[{"fix":"Consider using sequelize-cli or other maintained migration tools.","message":"Package last updated in 2020, no recent commits, issues unaddressed.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Wrap in a promise or use async.waterfall as shown in examples.","message":"Requires 'async' package for proper callback handling; migrate() does not return a promise.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use 'const SequelizeAuto = require('sequelize-auto-migration')(models);'","message":"Named exports are not available; must invoke the default export as a function with models object.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.0.7':26 '2020':79 'activ':74 'altern':96 'api':31 'applic':15 'auto':2,6,103,107,110 'auto-migr':5 'autom':33 'cli':60,91,98 'command':99 'compar':87 'complet':48 'databas':21 'electron':68 'electronj':12,101 'file':44 'instanc':42 'integr':66 'issu':82 'javascript':100 'lack':73 'last':76 'latest':27 'lightweight':64 'main':70 'mainten':75 'migrat':3,7,35,49,104,108,111 'mirror':57 'mssql':22 'node.js':14 'offer':93 'orm':18 'pass':39 'path':45 'postgresql':23 'process':71 'programmat':95 'provid':28 'relat':20 'schema':34 'seed':37 'seeder':9,54 'sequel':1,17,41,59,90,102,106,109 'sequelize-auto-migr':105 'sequelize-c':58,89 'sequelizedata':56 'sequelizemeta':51 'simpl':30 'sqlite3':24 'store':47 'support':86 'tabl':52 'tool':10,62 'typescript':85 'unaddress':81 'updat':77 'use':16 'version':25 'without':97","created_at":"2026-06-07T17:01:06.496826+00:00","updated_at":"2026-06-07T17:01:06.496826+00:00","problems":[{"fix":"Run 'npm install sequelize-auto-migration'","cause":"Package not installed or missing from node_modules.","error":"Cannot find module 'sequelize-auto-migration'"},{"fix":"Use: const SequelizeAuto = require('sequelize-auto-migration')(models);","cause":"Default import used incorrectly; missing function call with models.","error":"SequelizeAuto.config is not a function"},{"fix":"Ensure models object contains Sequelize instance with defined models.","cause":"Sequelize instance not passed or models not properly initialized.","error":"sequelize is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/medaamarnadh/sequelize-migration#readme","github":"https://github.com/medaamarnadh/sequelize-migration","docs":null,"changelog":null,"pypi":null,"npm":"sequelize-auto-migration","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}