Skip to content

open-fidias/marv-pg-driver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Code Style

marv-pg-driver

A postgres driver for marv

Usage

migrations/
  |- 001.create-table.sql
  |- 002.create-another-table.sql
const marv = require('marv')
const pgDriver = require('marv-pg-driver')
const directory = path.join(process.cwd(), 'migrations' )
const driver = pgDriver({
    table: 'db_migrations',     // defaults to 'migrations'
    connection: {               // the connection sub document is passed directly to pg.Client
        host: 'localhost',
        port: 5432,
        database: 'postgres',
        user: 'postgres',
        password: ''
    }
})
marv.scan(directory, (err, migrations) => {
    if (err) throw err
    marv.migrate(migrations, driver, (err) => {
        if (err) throw err
    })
})

About

A postgres marv driver implementation

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 99.2%
  • PLpgSQL 0.8%