111 | | The plugin can be uninstalled by removing the python egg file. |
112 | | The created database tables can be removed __before__ that using the following python code: |
113 | | {{{ |
114 | | #!python |
115 | | from tracwatchlist.db import delete_watchlist_tables |
116 | | delete_watchlist_tables("/path/to/your/trac/installation") |
117 | | }}} |
| 111 | An [source:watchlistplugin/dev/tools/uninstall.py uninstaller] (a python script) is provided to remove all created database tables. [ [http://trac-hacks.org/export/latest/watchlistplugin/dev/tools/uninstall.py Direct Download] ] |
| 112 | The plugin itself can be uninstalled by removing the python egg file. |
| 113 | |
| 114 | ==== Usage ==== |
| 115 | {{{ |
| 116 | # python uninstall.py /path/to/trac/environment [-t <tables>] [-u <username>] |
| 117 | }}} |
| 118 | |
| 119 | ==== Optional arguments ==== |
| 120 | `<tables>` stands for a comma-separated list of one or more of the DB tables `watchlist`, `watchlist_settings` and `system`. The first two are DB tables created by the plugin, while the last holds the watchlist version. |
| 121 | Only the given tables are deleted (the `system` table is not deleted of course, only the `watchlist_version` entry is removed). By default all three tables are affected. |
| 122 | |
| 123 | The watchlist data of only a single user can be deleted using the `-u` option which takes the username as argument. |
| 124 | |
| 125 | === Rename user names === |
| 126 | A [source:watchlistplugin/dev/tools/rename_user.py script] is provided to rename a user in the DB tables created by the plugin. [ [http://trac-hacks.org/export/latest/watchlistplugin/dev/tools/rename_user.py Direct Download] ] |
| 127 | Please note that no other tables or settings are affected. Renaming to an already existing username will result in an error if both watchlists share identical content. |
| 128 | |
| 129 | ==== Usage ==== |
| 130 | {{{ |
| 131 | # python rename_user.py /path/to/trac/environment <oldname> <newname> |
| 132 | }}} |
| 133 | |