Closed Bug 1069917 Opened 11 years ago Closed 9 years ago

Merge File and Version models

Categories

(Marketplace Graveyard :: Code Quality, defect, P4)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mat, Unassigned)

References

Details

(Whiteboard: [marketplace-transition])

On AMO, you can have multiple Files for one Version (to support different platforms if you depend on native binaries/libraries etc), so it makes sense to have separate models. On Mkt, you can't, and many places in the code assume that there will only ever be one file per version, since we do things like app.latest_version.all_files[0] to fetch information stored on the File model. to keep things DRY and remove useless complexity (and also improve perf by removing useless SQL queries) we should move everything on the File model to Version. One intermediary step would be to keep the File model but only have a OneToOne relation with Version.
Depending on the outcome of bug 1056612 we may need a version to have multiple files to target different platform versions. But, I hope we don't have to go that route and we can do this. I agree it would simplify all the codes.
Depends on: 1056612
Priority: -- → P4
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Whiteboard: [marketplace-transition]
You need to log in before you can comment on or make changes to this bug.