You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.
There's a handful of other models that look like might not be used (e.g. Quote or Hotel) - the following command ran from a django shell will list all tables that have no rows:
from django.db import connection
with connection.cursor() as cursor:
cursor.execute("select name from sqlite_master where type = 'table' AND name NOT LIKE 'sqlite_%' AND name NOT LIKE 'django_%' AND name NOT LIKE 'auth_%' and name NOT LIKE 'cms_%'");
tables = cursor.fetchall()
for table in tables:
tablename = table[0]
cursor.execute("select count(1) from {}".format(tablename))
row_count = cursor.fetchone()[0]
if row_count == 0:
print tablename
Having had a look at some of them, they seem to be used in quite a few views or dataaccess caching functions, so if those aren't used, that would allow to retire a big chunk of code. @artcz is there any way to query production logs to confirm particular used have not been used?
There's also a handful that at first glance don't seem to belong to any application:
Looks like we're not using it at all.
The text was updated successfully, but these errors were encountered: