Edgewall Software

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 destroy_db methods to the DatabaseManager class and implementations of the IDatabaseConnector interface.

API Changes:

The IDatabaseConnector interface has a new method destroy_db. The destroy_db method of EnvironmentStub is deprecated.

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 Ryan J Ollos, 9 years ago

Or we could make the table argument of drop_table default to None and drop all the tables when table = None: trunk/trac/db/api.py@13595:200#L184. Is one of the two approaches more preferable?

comment:2 by Jun Omae, 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 Ryan J Ollos, 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.

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

comment:4 by Jun Omae, 9 years ago

Well, I think that it would be good to add the destroy_db method to those class and interface.

comment:5 by Ryan J Ollos, 9 years ago

API Changes: modified (diff)
Release Notes: modified (diff)
Note: See TracTickets for help on using tickets.