0.0.2 • Published 8 years ago

miggy v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

This is a work in progress

miggy

SQL Database Migration made easy with TypeScript

NPM Build Coverage Dependencies devDependencies

Features

  • Fully Typed!
  • Auto Reverse from up
  • Supports Postgres, MySQL, MariaDB, Oracle and MSSQL

Examples

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");
  }
}