HCoop
/
hcoop
/
domtool2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding database dropping to dbtool
[hcoop/domtool2.git]
/
src
/
plugins
/
postgres.sml
diff --git
a/src/plugins/postgres.sml
b/src/plugins/postgres.sml
index
1689840
..
b92a5cf
100644
(file)
--- a/
src/plugins/postgres.sml
+++ b/
src/plugins/postgres.sml
@@
-34,9
+34,16
@@
fun createdb {user, dbname} =
else
SOME "Error executing CREATE DATABASE script"
else
SOME "Error executing CREATE DATABASE script"
+fun dropdb {user, dbname} =
+ if Slave.shell [Config.Postgres.dropdb, user, " ", dbname] then
+ NONE
+ else
+ SOME "Error executing DROP DATABASE script"
+
val _ = Dbms.register ("postgres", {getpass = NONE,
adduser = adduser,
passwd = passwd,
val _ = Dbms.register ("postgres", {getpass = NONE,
adduser = adduser,
passwd = passwd,
- createdb = createdb})
+ createdb = createdb,
+ dropdb = dropdb})
end
end