Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noamt/sequelize-migsplainer
Translate DB migrations into human speak
https://github.com/noamt/sequelize-migsplainer
reporting sequelize sequelize-migrations
Last synced: 16 days ago
JSON representation
Translate DB migrations into human speak
- Host: GitHub
- URL: https://github.com/noamt/sequelize-migsplainer
- Owner: noamt
- License: apache-2.0
- Created: 2020-11-02T13:24:08.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-22T08:33:29.000Z (over 3 years ago)
- Last Synced: 2024-10-05T09:41:49.130Z (about 1 month ago)
- Topics: reporting, sequelize, sequelize-migrations
- Language: JavaScript
- Homepage:
- Size: 839 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sequelize Migration Explainer
Translates database migration files into human speak.
![build](https://github.com/noamt/sequelize-migsplainer/workflows/test-and-lint/badge.svg)
![build](https://img.shields.io/badge/npm-v0.0.2-blue)
[![codecov](https://codecov.io/gh/noamt/sequelize-migsplainer/branch/main/graph/badge.svg?token=3e3jFHsQRr)](https://codecov.io/gh/noamt/sequelize-migsplainer)## About
While managing migration-as-code using [sequelize-auto-migrations](https://www.npmjs.com/package/sequelize-auto-migrations), I wanted to also be able to describe the evolution of the database in a more natural language.This tool reads migration files and produces an HTML report where each migration operation is converted to an explanation in English.
## Installation
```bash
npm i sequelize-migsplainer -g
```## Usage
From your project's root directory run:
```bash
migsplain --migrations relative/path/to/migrations/
```This will produce a report based on the migration files found in `relative/path/to/migrations/` and save it to `output/migrations.html`.
The location of the output file can be controlled using the `--output` switch:
```bash
migsplain --migrations relative/path/to/migrations/ --output /some/other/path.html
```