0.1.3 • Published 6 years ago
db-load v0.1.3
mysql-loader
Load CSV, XLSX, JSON or JS data into a mysql database, and export them as Sequelize models.
Installation
Install with:
npm install -g db-load
mysql-loader
usage
mysql-loader
loads files/directories of CSV, XLSX, JSON or JS data into a mysql database.
Usage:
mysql-loader [--force] DATABASE FILE_OR_DIR [FILE_OR_DIR...]
If will create two tables loader_runs
and loader_files
to track which files have changed between runs, to avoid importing them again. The flag --force
can be used to force importing all files even if there are no changes.
mysql-models
usage
mysql-models
receives the same arguments as mysql-loader
, and exports the tables into Sequelize models in the given output directory.
Usage:
mysql-models [options] DATABASE FILE_OR_DIR [FILE_OR_DIR...] --output MODELS_OUTPUT_DIR