# @barelyreaper/grator

> A mini tool to help with migration sql files

Latest version **0.0.4** (published 2021-05-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @barelyreaper/grator
pnpm add @barelyreaper/grator
yarn add @barelyreaper/grator
bun add @barelyreaper/grator
```

Provides the command `grator`.

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2021-05-02 |
| First published | 2021-04-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 5 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Reaper |
| Maintainers | barelyreaper |
| Keywords | cli, grator, migrations, sql, postgres |

## Links

- npm: https://www.npmjs.com/package/@barelyreaper/grator
- Repository: https://github.com/barelyhuman/grator
- Homepage: https://github.com/barelyhuman/grator#readme
- Issues: https://github.com/barelyhuman/grator/issues
- npm.io page: https://npm.io/package/@barelyreaper/grator

## Dependencies (5)

- [pg](https://npm.io/package/pg.md) ^8.6.0
- [ora](https://npm.io/package/ora.md) ^5.4.0
- [knex](https://npm.io/package/knex.md) ^0.95.4
- [meow](https://npm.io/package/meow.md) ^9.0.0
- [@barelyreaper/conch](https://npm.io/package/@barelyreaper/conch.md) 0.0.4

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2021-05-02
- 0.0.3 — 2021-04-28
- 0.0.2 — 2021-04-28
- 0.0.1 — 2021-04-28

## README

# PACKAGE MOVED TO @barelyhuman/grator

# grator

Simple Utility to run migrations with a retry

### Motivation 
A few services generate their own migrations for us to use but the order of these migration queries are often invalid and never migrate properly and 
cause a lot of issues when needed. The cli utility simply goes through the set of queries and runs them with retry attempts to make sure each statement is run at least 3 times. In the future you can obviously change this number. 

### Installation 
```sh
npm i -g @barelyreaper/grator
```


### Usage 

#### Requirements
- A json config file named `grator.json` or anything as long as you point to it with the needed flag
- A folder named `migrations` or any other folder with an `up.sql` and a `down.sql` file based on requirement

```sh
Usage
	  $ grator [up|down]

	Options
	  --config, -c configuration file [Default: ./grator.json]
	  --directory, -d  migrations directory, should contain up.sql and down.sql [Default: ./migrations]

	Examples
	  $ grator up -c grator.json	
	  $ grator down -c grator.json -d migrations
```

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