Drop table if exists
This commit is contained in:
parent
7521e2494b
commit
29029298fe
@ -40,7 +40,7 @@ var con = new pg.Client({
|
|||||||
con.connect();
|
con.connect();
|
||||||
if(args.down) {
|
if(args.down) {
|
||||||
console.log("Dropping table 'person'")
|
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() {
|
query.on('end', function() {
|
||||||
console.log("Dropped!");
|
console.log("Dropped!");
|
||||||
con.end();
|
con.end();
|
||||||
|
Loading…
Reference in New Issue
Block a user