Giter Club home page Giter Club logo

pg_migrate's Introduction

pg_migrate

A very simple database migration tool for PostgreSQL. No tests yet - use at your own risk!

How do I use it?

Create a directory to hold your migrations. Migrations must be named [number]-[description].sql, where number starts from 1. An example could be 1-initial.sql and 2-add-post-table.sql and so on.

pg_migrate will create a new table in your database called migrations to keep track of which migrations have already been applied. If you ran pg_migrate with the two migrations above, then later added 3-alter-post-table.sql, pg_migrate would only apply this migration the next time it.

$ pg_migrate --help
usage: pg_migrate [<flags>]

Flags:
  --help               Show help.
  --dir="/Users/olav/Sources/Go/src/github.com/oal/pg_migrate"
                       Directory where migration files are located. Current working directory will be
                       used by default
  --host="localhost"   Server address and port
  --port=5432          Server port
  --db="postgres"      Database name
  --user="postgres"    User
  --password=PASSWORD  Password
  --sslmode="disable"
  --history            Show migration history
  --verbose            Verbose output

pg_migrate's People

Contributors

oal avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.