Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "grunt-pg", | ||
"description": "Grunt plugin to help with administering Postgres.", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"homepage": "https://github.com/moneytribeaustralia/grunt-pg", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -31,10 +31,4 @@ # grunt-pg | ||
## Tasks ## | ||
## Synopsis ## | ||
There are 5 tasks in grunt-pg: *pgcreateuser*, *pgdropuser*, *pgcreatedb*, *pgowner* and *pgdropdb*. | ||
Each works similarly as the example below shows. The connection credentials must be a user who is privieleged enough to | ||
be able to perform these operations. For example, using the 'postgres' user to the 'template1' database should be | ||
sufficient. | ||
Firstly, an example of using the pgcreate task: | ||
@@ -57,2 +51,11 @@ | ||
## Tasks ## | ||
There are 5 tasks in grunt-pg: *pgcreateuser*, *pgdropuser*, *pgcreatedb*, *pgowner* and *pgdropdb*. Each task is a | ||
multitask. | ||
Each works similarly as the example above shows. The connection credentials must be a user who is privieleged enough to | ||
be able to perform these operations. For example, using the 'postgres' user to the 'template1' database should be | ||
sufficient. | ||
The connection object can also specify anything that [node-pg][] understands: user, database, password, port and host. | ||
@@ -68,9 +71,2 @@ | ||
## The "pgdrop" task | ||
## Contributing | ||
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed | ||
functionality. Lint and test your code using [grunt][]. | ||
## Release History | ||
@@ -77,0 +73,0 @@ |
@@ -10,4 +10,2 @@ /* | ||
'use strict'; | ||
var pg = require('pg'); | ||
@@ -30,3 +28,2 @@ | ||
pg.end(); | ||
done(); | ||
@@ -60,3 +57,3 @@ }); | ||
var stmt = 'DROP user ' + data.user; | ||
var stmt = 'DROP ROLE IF EXISTS ' + data.user; | ||
@@ -63,0 +60,0 @@ execute_db(data.connection, stmt, function(err, res) { |
9481
158
83