# sequelize-sync

> Bash script to sync all sequelize models into the database, with force option

Latest version **0.1.0** (published 2014-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install sequelize-sync
pnpm add sequelize-sync
yarn add sequelize-sync
bun add sequelize-sync
```

Provides the command `sequelize-sync`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-09-25 |
| First published | 2014-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Ryan Fink |
| Maintainers | rfink |
| Keywords | sequelize, sync, database, mysql, postgres, sqlite, sql |

## Links

- npm: https://www.npmjs.com/package/sequelize-sync
- Repository: https://github.com/rfink/sequelize-sync
- Issues: https://github.com/rfink/sequelize-sync/issues
- npm.io page: https://npm.io/package/sequelize-sync

## Dependencies (1)

- [commander](https://npm.io/package/commander.md) ^2.2.0

## Alternatives

- [@libsql/sqlite3](https://npm.io/package/@libsql/sqlite3.md) — 39.8K weekly downloads
- [@fortemi/core](https://npm.io/package/@fortemi/core.md) — 461 weekly downloads
- [cdb-converter](https://npm.io/package/cdb-converter.md) — 341 weekly downloads
- [typeorm-aios](https://npm.io/package/typeorm-aios.md) — 30 weekly downloads
- [database-js2](https://npm.io/package/database-js2.md) — 28 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2014-09-25
- 0.0.0 — 2014-06-21

## README

sequelize-sync
==============

Simple bash script to sync/drop all models from sequelize to the database.  Also can
supply list of models to sync/drop.

Usage
==============

To install sequelize-sync, simply do:

```
    (sudo) npm install -g sequelize-sync
```

That's pretty much it.  You need to point it to a node module that exports a connection
to sequelize, with you models already attached.  This may change in the future, I may
add the ability to just point to a module and a directory for models.  The options
are as follows:

* --sequelize (-s) - Give the path to the sequelize module (i.e. ~/my-module/lib/common/sequelize.js
* --force (-f) - Force the schema change (drop and recreate)
* --dump-sql (-d) - Dump the sql to the screen (can be used in conjunction with other options)
* --models (-m) - Give a comma separate list of models to sync/drop
* --drop (-x) - Drop the schemas instead of creating

I noticed I had been creating a bash script to do this for every one of my sequelize related
projects, so I decided to create this handy library.

Testing
==============

Uses mocha and should.  Installs sequelize and sqlite3 node modules, make sure you have
sqlite3 installed.  Run `npm test`.

License
==============
MIT license, have at it.

---
_Source: https://npm.io/package/sequelize-sync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
