mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Drop table if exists
This commit is contained in:
parent
7521e2494b
commit
29029298fe
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user