]> scripts.mit.edu Git - wizard.git/blobdiff - doc/plugin.rst
Schlep around database handling functions to wizard.sql, add wizard.sql.drop hook.
[wizard.git] / doc / plugin.rst
index 347b18b2068172956a8326f798997a433ba92b58..51e0536dd1d8483abdd187db22104259c5f8ef9c 100644 (file)
@@ -50,7 +50,7 @@ For more information on how to create an application, check
 .. _wizard.install.strategy:
 
 ``wizard.install.strategy``
--------------------
+---------------------------
 
 Used during installation to automatically determine values for
 installation parameters the user may have omitted.  Plugin should be a
@@ -79,7 +79,20 @@ that runs this plugin is :func:`wizard.sql.auth`.
     If Wizard is able to determine the login credentials from the
     application's source files, these plugins will not be run.
 
+.. _wizard.sql.drop:
 
+``wizard.sql.drop``
+------------------------------
+
+Used to remove a SQL database, as might be done when an application is
+being uninstalled.  Plugin should be a function that takes a single
+required argument ``dsn``, which is a
+:class:`sqlalchemy.engine.url.URL` and should return either ``None`` if
+it was unable to delete the database, or ``True`` in the event of
+success.  This is a good plugin to implement if you don't give your
+users ``DROP DATABASE`` permissions, and instead they have to create and
+delete databases through another interface.  The function that runs this
+plugin is :func:`wizard.sql.drop`.
 
 .. _wizard.deploy.web: