Opened 9 years ago
Last modified 9 years ago
#11978 closed enhancement
Add drop_schema method to ConnectionBase class — at Version 5
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.1.5 |
Component: | database backend | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Added |
||
API Changes: |
The |
||
Internal Changes: |
Description
After adding the method we can refactor the code in EnvironmentStub
to eliminate the SQL query: trunk/trac/test.py@13818:355#L349.
Change History (5)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
I like first approach and destroy_db
rather than drop_schema
. init_db
method already exists and only PostgreSQL uses schema.
comment:3 by , 9 years ago
Should we add the destroy_db
method to the DatabaseManager
class (tags/trac-1.1.3/trac/db/api.py@:324#L299) and IDatabaseConnector
interface (tags/trac-1.1.3/trac/db/api.py@:287#L262)? I started working on a patch with those changes and I'll finish it after the 1.1.4 release.
comment:4 by , 9 years ago
Well, I think that it would be good to add the destroy_db
method to those class and interface.
Or we could make the
table
argument ofdrop_table
default toNone
and drop all the tables whentable = None
: trunk/trac/db/api.py@13595:200#L184. Is one of the two approaches more preferable?