Merge pull request #430 from shine-on/master

Drop table if exists
This commit is contained in:
Brian C 2013-09-01 19:22:06 -07:00
commit a4caea51be
2 changed files with 4 additions and 1 deletions

View File

@ -40,7 +40,7 @@ var con = new pg.Client({
con.connect();
if(args.down) {
console.log("Dropping table 'person'")
var query = con.query("drop table person");
var query = con.query("drop table if exists person");
query.on('end', function() {
console.log("Dropped!");
con.end();

View File

@ -9,6 +9,9 @@ for(var i = 0; i < process.argv.length; i++) {
case 'binary':
config.binary = true;
break;
case 'down':
config.down = true;
break;
default:
break;
}