{"id":22446771,"url":"https://github.com/boiawang/sequelize-db-export-import","last_synced_at":"2025-08-01T21:32:10.925Z","repository":{"id":26318936,"uuid":"29767200","full_name":"boiawang/sequelize-db-export-import","owner":"boiawang","description":"Generater models from mysql db or import tables from models files","archived":false,"fork":false,"pushed_at":"2018-05-15T12:11:45.000Z","size":1286,"stargazers_count":27,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-31T03:51:00.670Z","etag":null,"topics":["coffeescript","mysql","node","sequelize"],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boiawang.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-24T05:54:42.000Z","updated_at":"2025-06-02T16:10:36.000Z","dependencies_parsed_at":"2022-08-27T16:40:44.744Z","dependency_job_id":null,"html_url":"https://github.com/boiawang/sequelize-db-export-import","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/boiawang/sequelize-db-export-import","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boiawang%2Fsequelize-db-export-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boiawang%2Fsequelize-db-export-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boiawang%2Fsequelize-db-export-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boiawang%2Fsequelize-db-export-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boiawang","download_url":"https://codeload.github.com/boiawang/sequelize-db-export-import/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boiawang%2Fsequelize-db-export-import/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268297795,"owners_count":24228135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coffeescript","mysql","node","sequelize"],"created_at":"2024-12-06T04:11:19.053Z","updated_at":"2025-08-01T21:32:10.530Z","avatar_url":"https://github.com/boiawang.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sequelize-DB-Export-Import\n\n[![Build Status][travis-image]][travis-url]\n\nGenerate models files from db or generate tables from models.\n\nOnly mysql\n\n![cmd](https://raw.githubusercontent.com/boiawang/sequelize-db-export-import/master/assets/resource-1.png)\n\n\u003cbr /\u003e\n\n![preview](https://raw.githubusercontent.com/boiawang/sequelize-db-export-import/master/assets/resource-2.png)\n\n## Install\n\n```\nnpm install -g sequelize-db-export-import\n```\n\n## Usage\n\n```\nseq-ei Create models by database or Create tables by models\n\n-h, --help            output usage information\n-V, --version         output the version number\n-r, --reverse         is generate model files or generate tables\n-H, --host \u003cn\u003e        host ip default: 127.0.0.1\n-u, --user \u003cn\u003e        host user default: root\n-p, --password \u003cn\u003e    host password. default: \"\"\n-d, --database \u003cn\u003e    database name\n-o, --output \u003cdir\u003e    select models dir\n-m, --dialect \u003cn\u003e     db type\n-P, --port \u003cn\u003e        db port. default: 3306\n-e, --compile \u003ctype\u003e  model file type\n-c, --config \u003cfile\u003e   config file\n-C, --camel           convert tableName and file to camelCase\n-s, --space \u003cn\u003e       you can select 2 space or 4 space\n--no-default-value    exclude default data values\n```\n\n### Export models from db\n\n```\nseq-ei -H 192.168.1.220 -u root -p 123 -d test -o ./models -m mysql -P 3306 -e coffee -s 2\n```\n\n### Import tables from model files\n\n```\nseq-ei -r -H 192.168.1.220 -u root -p 123 -d test -o ./models -m mysql -P 3306 -e coffee -s 2\n```\n\n### Also use config file\n\nconfig.json\n```\n{\n  \"user\": \"root\",\n  \"password\": \"\",\n  \"host\": \"127.0.0.1\",\n  \"database\": \"test\",\n  \"dir\": \"./models\",\n  \"port\": 3306,\n  \"compile\": \"coffee\",\n  \"logging\": false,\n  \"space\": 2,\n  \"reverse\": false\n}\n```\n\n```\nseq-ei -c config.json\n```\n\n## Test\n\n```\n# test all\nmake test\n\n# test coverage\nmake test-cov\n\n# test watch\nmake test-watch\n```\n\n### Todo\n\n* postgres\n* add cmd color\n* add table output\n\n## License\n\nThe MIT License\n\n[travis-image]: https://travis-ci.org/boiawang/sequelize-db-export-import.svg\n[travis-url]: https://travis-ci.org/boiawang/sequelize-db-export-import\n[coveralls-image]: https://img.shields.io/coveralls/boiawang/sequelize-db-export-import.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/boiawang/sequelize-db-export-import?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboiawang%2Fsequelize-db-export-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboiawang%2Fsequelize-db-export-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboiawang%2Fsequelize-db-export-import/lists"}