Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goenning/miggy
SQL Schema as Code
https://github.com/goenning/miggy
Last synced: 13 days ago
JSON representation
SQL Schema as Code
- Host: GitHub
- URL: https://github.com/goenning/miggy
- Owner: goenning
- Created: 2016-10-31T20:18:22.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-01T13:29:44.000Z (about 8 years ago)
- Last Synced: 2024-12-02T23:17:44.708Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
> `This is a work in progress`
# miggy
`SQL Database Migration made easy with TypeScript`
[![NPM](https://img.shields.io/npm/v/miggy.svg)](https://www.npmjs.com/package/miggy)
[![Build](https://travis-ci.org/goenning/miggy.svg?branch=master)](https://travis-ci.org/goenning/miggy)
[![Coverage](https://coveralls.io/repos/github/goenning/miggy/badge.svg?branch=master)](https://coveralls.io/github/goenning/miggy?branch=master)
![Dependencies](https://david-dm.org/goenning/miggy.svg)
![devDependencies](https://david-dm.org/goenning/miggy/dev-status.svg#info=devDependencies)## Features
- Fully Typed!
- Auto Reverse from `up`
- Supports Postgres, MySQL, MariaDB, Oracle and MSSQL## Examples
```typescript
import { Migration } from "miggy";export class CreateProducts extends Migration {
up() {
this.create.table("products", (t) => {
t.id();
t.string("name").length(40);
t.decimal("price").precision(10).scale(2);
t.string("description").length(500).notNull();
});
}down() {
this.drop.table("products");
}
}
```