# flyway-validator

> Basic validation for flyway script directory

Latest version **1.2.2** (published 2020-02-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install flyway-validator
pnpm add flyway-validator
yarn add flyway-validator
bun add flyway-validator
```

Provides the command `flyway-validator`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2020-02-07 |
| First published | 2020-02-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | aquirkles |
| Maintainers | quirkles |

## Links

- npm: https://www.npmjs.com/package/flyway-validator
- npm.io page: https://npm.io/package/flyway-validator

## Recent versions

- 1.2.2 (latest) — 2020-02-07
- 1.1.1 — 2020-02-05
- 1.1.0 — 2020-02-05
- 1.0.2 — 2020-02-05
- 1.0.1 — 2020-02-05
- 1.0.0 — 2020-02-05

## README

# Flyway migration script validator

This is a simple package that will validate a few facts about the flyway migrations cripts in a provided directory as a sanity check.

# Usage

Install with

```
npm install --save-dev @nw/flyway-validator
```

or

```
npm install --save-dev @nw/flyway-validator
```

then just scan any directory containing flyway scripts

```
npx @nw/flyway-validator path/to/directory
```

If everything is ok, the process will complete with an exit code of 0, otherwise it will exit with an error and display a (hopefully) helpful message explaining what it thinks is the problem.

It is recommended to add this check to a pre-commit hook or something so that you dont have to think about it.

# What is checked

- The first file is versioned as `1.0.0`, `0.1.0`, `0.0.1`

- The files version numbers are dates are both in the same sequence

- The sequence numbers do not skip any version, ie a jump from `1.0.0` to `2.3.0` is invalid

- No files have beem modified since the last commit

# What is not checked

ANYTHING ELSE!

no sql validations, no schema validations, no model or business logic, that is all up to you. This is seatbelt, you still have to drive safely!

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