Opened 17 years ago

Closed 17 years ago

#6599 closed (wontfix)

Reset single application should load initial_data

Reported by: CHasenpflug Owned by: nobody
Component: Uncategorized Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

One can flush to reset all applications, it does not accept an argument for a single app name. Or one can reset and then loaddata for the initial_data fixture.

I would propose either allowing one to flush a single app, or have reset load the inital_data fixture for that app.

Change History (1)

comment:1 by Russell Keith-Magee, 17 years ago

Resolution: wontfix
Status: newclosed

This isn't as simple as you make it seem. Flush needs to operate on a 'all or nothing' basis because of cross-application dependencies. It's pretty much impossible to resolve cross-application dependencies in a completely generic fashion, especially once your tables contain data (and you use a database that enforces row-relational integrity).

The reset command exists for historical reasons, but it is essentially broken as designed; it doesn't take too many cross-application dependencies to cause all sorts of problems. I've been an advocate for deprecating it, but in the absence of an officially recommended schema-evolution mechanism, it can be useful occasionally.

On top of this - what is the 'initial_data fixture for an app'? Just loading the data in the fixture directory for a specific application would be a partial solution, but it won't be a complete solution, because fixture data isn't bound to a specific application. This is a good thing. Without it, it wouldn't be possible to insert default user accounts (or any other project specific data for contributed applications).

Note: See TracTickets for help on using tickets.
Back to Top