Drop table if exists

This commit is contained in:
shine-on 2013-08-31 11:20:33 +03:00
parent 7521e2494b
commit 29029298fe

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();