Skip to content

Commit a4caea5

Browse files
committed
Merge pull request brianc#430 from shine-on/master
Drop table if exists
2 parents 5eb8ba2 + 8284315 commit a4caea5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

script/create-test-tables.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var con = new pg.Client({
4040
con.connect();
4141
if(args.down) {
4242
console.log("Dropping table 'person'")
43-
var query = con.query("drop table person");
43+
var query = con.query("drop table if exists person");
4444
query.on('end', function() {
4545
console.log("Dropped!");
4646
con.end();

test/cli.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ for(var i = 0; i < process.argv.length; i++) {
99
case 'binary':
1010
config.binary = true;
1111
break;
12+
case 'down':
13+
config.down = true;
14+
break;
1215
default:
1316
break;
1417
}

0 commit comments

Comments
 (0)