mozilla/kuma — pull request #764 by ubernostrum (2012-12-13 16:37:22+00:00)
Title: Bug 779543: DB-level relation between files and documents

I'm still not 100% certain it's necessary, but since it keeps being asked for, let's do it and see if it makes cleaning up the rest of file attachments easier :)

This just adds a simple intermediary m2m model that stores some info and lets us query on the relationship between documents and files. There's a migration to create the new m2m table and populate it correctly from the existing documents, and invisible view support for a new querystring parameter that will trigger creation of new intermediary objects for newly-uploaded files going forward, so assuming it passes review should be safe to deploy up-front.