Registry / database / sequelize-db-export-import

sequelize-db-export-import

JSON →
library0.1.13jsnpmunverified

A CLI tool to generate Sequelize model files from a MySQL database schema or create tables from existing model files. Version 0.1.13 is the latest, developed in CoffeeScript with limited updates. Supports MySQL only, with configurable dialect, output directory, indentation, and camelCase naming. Differentiates from sequelize-auto by supporting both export and import directions via a simple command line interface.

npm install sequelize-db-export-import
INSTALL
IMPORT
SIG · SEQUELIZE-DB-EXPOR
S
sequelize-db-export-import
databasejavascriptv0.1.13
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

seq-ei CLI
npx seq-ei -H host -u user -p pass -d db -o ./models -m mysql
npm run seq-ei
The package is a CLI tool, not a programmatic library. Use npx for execution.
ConfigFile
seq-ei -c config.json
Config file should be in JSON format as shown in README.
Reverse flag
seq-ei -r ...
seq-ei --reverse ...
Uses short flag -r for reverse direction (import).

Generate Sequelize model files from a MySQL database with default settings.

seq-ei -H 127.0.0.1 -u root -p '' -d mydb -o ./models -m mysql -P 3306 -e js -s 2
Debug
Known issues
gotchaOnly MySQL is supported; specifying other dialects will fail.
fix
Ensure database is MySQL and use -m mysql.
affects: >=0.0.0
gotchaThe package is written in CoffeeScript and no longer actively maintained. May not work with latest Node.js or Sequelize versions.
fix
Consider using sequelize-auto for active development and broader support.
affects: >=0.0.0
gotchaThe CLI must be installed globally or via npx; local installation may not expose the seq-ei command.
fix
Use `npx sequelize-db-export-import seq-ei ...` or install globally.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'commander'
Dependencies not installed when using global install without --save-peer.
fix
Run npm install -g sequelize-db-export-import; ensure dependencies are installed.
Error: Unknown database 'mydb'
Database name is misspelled or does not exist.
fix
Verify the database name with `SHOW DATABASES;`
Error: connect ECONNREFUSED 127.0.0.1:3306
MySQL server is not running or host/port are wrong.
fix
Start MySQL service and check host and port parameters.
Upgrade
Version history
0.1.13latest on npm
Audit
Dependencies
commanderrequiredCLI argument parsing
sequelizerequiredCore ORM used for database connections and model generation
mysql2requiredMySQL database driver
Agent activity
13 hits · last 30 days
node
10
Meta
2
Resources
sequelize-db-export-import — npm install sequelize-db-export-import · libregistry