# tiny-migrate

> ERROR: No README.md file found!

Latest version **0.0.2** (published 2013-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install tiny-migrate
pnpm add tiny-migrate
yarn add tiny-migrate
bun add tiny-migrate
```

## 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.0.2 |
| Published | 2013-04-15 |
| First published | 2013-04-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tim Oxley |
| Maintainers | timoxley |
| Keywords | mysql, migration |

## Links

- npm: https://www.npmjs.com/package/tiny-migrate
- Repository: https://github.com/timoxley/tiny-migrate
- npm.io page: https://npm.io/package/tiny-migrate

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ~0.7.2
- [mysql](https://npm.io/package/mysql.md) ~2.0.0-alpha7
- [commander](https://npm.io/package/commander.md) ~1.1.1

## Recent versions

- 0.0.2 (latest) — 2013-04-15
- 0.0.1 — 2013-04-15

## README

# tiny-migrate

Naive sql migrations. Just supply a directory of versioned/numbered .sql files,
and it will run them in order.

## Example

```js
var Migrate = require('tiny-migrate')
var mysql = require('mysql')

var connection = mysql.createConnection({
  host     : 'localhost',
  user     : 'me',
  password : 'secret',
});

connection.connect(function(err) {
  var connection = mysql.createConnection
  var migration = Migrate(connection)
  migration
    .use('some-database') // Db will be created if it doesn't exist
    .drop() // drop db before creation
    .migrate('db/migrations') // relative path to migrations
    .run(function(err) {
      console.log('Migration complete:', arguments)
    }) 
})
```

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