This reverts commit 8099d33b6553c9ee7de779ae9d191a1bf22adbda as it caused
a regression that cannot be solved without changing force_text() which has
a small risk of introducing regressions. This change will remain in master
along with an update to force_text().
QuerySet.exists() incorrectly handled query.group_by = True
case (grouping by all select fields), causing GROUP BY
expressions to be wiped along with select fields.
Backport of 801a84ae329a24d9adf01b700429fe8f1285b2b8 from master
Added apps to unmigrated apps if the migrations module is a file
or a folder missing __init__.py.
Thanks to Ernest0x for the bug report.
Backport of d73176a84273c06fa11075c65293ec28497a8423 from master