Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: db-migrate/node-db-migrate
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: strivewire/node-db-migrate-postgresql-only
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Apr 3, 2015

  1. Copy the full SHA
    ed1f107 View commit details
  2. 0.9.13

    wzrdtales committed Apr 3, 2015
    Copy the full SHA
    ea48738 View commit details

Commits on Apr 18, 2015

  1. [bugfix] createMigrationTable crashes on pg while dryRun is active

    CreateMigrationsTable used runSql instead of all, thus it could not execute the
    necessary functionality while the dryRun, also this is needed to proceed.
    
    runSql was replaced by all and all was also promisified to work properly.
    the access from row was removed while replacing runSql with all.
    
    fixes #259
    wzrdtales committed Apr 18, 2015
    Copy the full SHA
    918df65 View commit details
  2. 0.9.14

    wzrdtales committed Apr 18, 2015
    Copy the full SHA
    9afc4cc View commit details

Commits on May 8, 2015

  1. Escape schema for postgres

    If the name chosen for a schema contains certain characters, it must be
    surrounded in quotes. This ensures those quotes are added when choosing the
    schema by setting the `search_path`.
    Mike Atkins committed May 8, 2015
    Copy the full SHA
    43c8a80 View commit details

Commits on May 11, 2015

  1. Create client as topic

    Mike Atkins committed May 11, 2015
    Copy the full SHA
    ea053ee View commit details
  2. Add test for schema escaping

    Mike Atkins committed May 11, 2015
    Copy the full SHA
    d561e0e View commit details
  3. Ignore vim swap files

    Mike Atkins committed May 11, 2015
    Copy the full SHA
    94db67d View commit details

Commits on May 13, 2015

  1. Merge pull request #268 from apechimp/escape-schema-name

    [Bugfix] Add proper escaping for schema when using postgres driver
    
    Reviewed-By: Tobias Gurtzick <magic@wizardtales.com>
    wzrdtales committed May 13, 2015
    Copy the full SHA
    b96fc2e View commit details

Commits on May 26, 2015

  1. 0.9.15

    wzrdtales committed May 26, 2015
    Copy the full SHA
    b2c2bdb View commit details

Commits on May 31, 2015

  1. Copy the full SHA
    709a84b View commit details
  2. fix DST issue, modified cherry picked changes to work with v0.9.x and…

    … modified database.json of integration tests to use memory db
    wzrdtales committed May 31, 2015
    Copy the full SHA
    ae51b4c View commit details
  3. 0.9.16

    wzrdtales committed May 31, 2015
    Copy the full SHA
    09d56c2 View commit details

Commits on Jun 22, 2015

  1. [bugfix] Redshift fails on executing set search_path TO because of no…

    …n quoted response
    
    quoting the response of show search_path
    adding logging to all function
    
    pass error instead of reading emtpy row on error in all function
    wzrdtales committed Jun 22, 2015
    Copy the full SHA
    75e1b17 View commit details
  2. 0.9.17

    wzrdtales committed Jun 22, 2015
    Copy the full SHA
    2412c1e View commit details

Commits on Jun 28, 2015

  1. update mysql dependency

    wzrdtales committed Jun 28, 2015
    Copy the full SHA
    14f6077 View commit details
  2. 0.9.18

    wzrdtales committed Jun 28, 2015
    Copy the full SHA
    e98bcff View commit details

Commits on Aug 6, 2015

  1. Copy the full SHA
    76b9192 View commit details
  2. Create migrations table in specified schema

    In postgres, if you create a migrations table in one schema of your database,
    and then try to use this for migrations in another schema, it will not create
    the migrations table in the second schema which will prevent any migrations
    from running on that schema. This creates the migrations table in that second
    schema when the schema parameter is specified.
    Mike Atkins committed Aug 6, 2015
    Copy the full SHA
    67c41df View commit details

Commits on Aug 7, 2015

  1. Merge pull request #287 from apechimp/use-schema-migrations-table

    [Bugfix] Create migrations table in specified schema
    wzrdtales committed Aug 7, 2015
    Copy the full SHA
    75f79ca View commit details
  2. 0.9.19

    wzrdtales committed Aug 7, 2015
    Copy the full SHA
    bfc3b49 View commit details

Commits on Aug 12, 2015

  1. trim the returned schema in the pg driver

    For some reason postgresql alpha 9.5 and redshift are now returning the search path information with white spaces. This results in an undefined behavior.
    
    Fixed by trimming all values returned and processed pg and redshift.
    
    fixes #288
    wzrdtales committed Aug 12, 2015
    Copy the full SHA
    0e9f2a4 View commit details
  2. get travis.yml from master

    wzrdtales committed Aug 12, 2015
    Copy the full SHA
    fff5a79 View commit details
  3. 0.9.20

    wzrdtales committed Aug 12, 2015
    Copy the full SHA
    889c341 View commit details

Commits on Sep 10, 2015

  1. bump sqlite3

    wzrdtales committed Sep 10, 2015
    Copy the full SHA
    a3ad4bf View commit details
  2. 0.9.21

    wzrdtales committed Sep 10, 2015
    Copy the full SHA
    dc6d9b1 View commit details
  3. new travis

    wzrdtales committed Sep 10, 2015
    Copy the full SHA
    76a03fa View commit details
  4. [bugfix] pg db:create does not work

    A wrong quotation in the pg driver caused db:create to throw an exception. Also we need to check if the close method gets an function passed as callback, before actually calling it.
    
    resolves #307
    
    Other things fixed:
    
    Mute dotenv
    wzrdtales committed Sep 10, 2015
    Copy the full SHA
    00cbe82 View commit details
  5. 0.9.22

    wzrdtales committed Sep 10, 2015
    Copy the full SHA
    1d75536 View commit details

Commits on Sep 21, 2015

  1. return errors and connect while connecting the driver to db-migrate

    this also throws more friendly error messages, refers to #311
    wzrdtales committed Sep 21, 2015
    Copy the full SHA
    4a6c02c View commit details
  2. 0.9.23

    wzrdtales committed Sep 21, 2015
    Copy the full SHA
    0749cf0 View commit details

Commits on Oct 8, 2015

  1. updat travis from master

    wzrdtales committed Oct 8, 2015
    Copy the full SHA
    ea01010 View commit details

Commits on May 26, 2016

  1. chore(build): add node6

    wzrdtales committed May 26, 2016
    Copy the full SHA
    19e41d2 View commit details
  2. Copy the full SHA
    b32734e View commit details
  3. 0.9.24

    wzrdtales committed May 26, 2016
    Copy the full SHA
    7566351 View commit details
  4. 0.9.25

    wzrdtales committed May 26, 2016
    Copy the full SHA
    bd942bc View commit details

Commits on Sep 27, 2016

  1. fix(backport): Backport addColumn fix to 0.9.x

    Fixes #407
    Fixes #408
    wzrdtales committed Sep 27, 2016
    Copy the full SHA
    9de3a43 View commit details

Commits on Sep 28, 2016

  1. 0.9.26

    wzrdtales committed Sep 28, 2016
    Copy the full SHA
    f34f43d View commit details

Commits on Oct 5, 2016

  1. remove this fucking sqlite3 dependency

    Benjamin Flesch committed Oct 5, 2016
    Copy the full SHA
    076f21d View commit details
  2. fix db-meta

    Benjamin Flesch committed Oct 5, 2016
    Copy the full SHA
    fdfe115 View commit details
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -9,3 +9,7 @@ database.json
*.sublime-workspace
Seeder
VCSeeder
archive

# Vim swap files
.*.sw[a-z]
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -7,3 +7,4 @@ database.json
*.sublime-workspace
Seeder
VCSeeder
archive
52 changes: 38 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -3,32 +3,56 @@ language: node_js
node_js:
- 0.10
- 0.12
- io.js
- 4
- 5
- 6
- "iojs-1"
- "iojs-2"
- "iojs-3"
- "iojs"

notifications:
email:
recipients:
- magic@wizardtales.com
webhooks:
urls:
- https://webhooks.gitter.im/e/509c88551a18006fe93f
on_success: change
on_failure: always
on_start: false

os:
- linux

matrix:
fast_finish: true
allow_failures:
- node_js: 6

services:
- mongodb

env:
- DB=mysql
- DB=mariadb
- DB=postgres92
- DB=postgres93
sudo: false

cache:
npm: true
directories:
- node_modules

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
mariadb: "10.0"

before_install:
- export CXX=g++-4.8; export CC=gcc-4.8;

before_script:
- until nc -z localhost 27017 ; do echo Waiting for MongoDB; sleep 1; done
- sh -c "if [ '$DB' = 'mariadb' ]; then sudo apt-get install python-software-properties; fi"
- sh -c "if [ '$DB' = 'mariadb' ]; then sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db; fi"
- sh -c "if [ '$DB' = 'mariadb' ]; then sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main'; fi"
- sh -c "if [ '$DB' = 'mariadb' ]; then sudo apt-get update; fi"
- sh -c "if [ '$DB' = 'mariadb' ]; then sudo apt-get purge mysql*; fi"
- sh -c "if [ '$DB' = 'mariadb' ]; then sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install mariadb-server-10.0 -y; fi"
- sh -c "if [ '$DB' = 'postgres92' ]; then sudo /etc/init.d/postgresql stop && sudo /etc/init.d/postgresql start 9.2; fi"
- sh -c "if [ '$DB' = 'postgres93' ]; then sudo /etc/init.d/postgresql stop && sudo /etc/init.d/postgresql start 9.3; fi"
- mysql -e "create database db_migrate_test;"
- createdb db_migrate_test
- cp test/db.config.ci test/db.config.json
2 changes: 1 addition & 1 deletion bin/db-migrate
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ var dotenv = require('dotenv');
dbm = require( '../' );
async = require( 'async' );

dotenv.load();
dotenv.load({ silent: true });

process.on('uncaughtException', function(err) {
log.error(err.stack);
2 changes: 1 addition & 1 deletion lib/driver/base.js
Original file line number Diff line number Diff line change
@@ -175,7 +175,7 @@ module.exports = Base = Class.extend({
},

addColumn: function(tableName, columnName, columnSpec, callback) {
var def = this.createColumnDef(columnName, this.normalizeColumnSpec(columnSpec));
var def = this.createColumnDef(columnName, this.normalizeColumnSpec(columnSpec), {});
var sql = util.format('ALTER TABLE "%s" ADD COLUMN %s', tableName, def);
this.runSql(sql, callback);
},
Loading