Django (removal of .auth and .django tables that are created after migrate command)

25 Views Asked by At

I have these 10 tables in Django (6-Auth tables and 4 Django tables) I am not using these files in my production project, I thought of removing them but read that its not a good practice to remove. I am dealing with some million records(GET and POST operations), Will these tables effect my code performance in the long run?

I have Tried removing these tables but all of them are interlinked with foreign keys.

1

There are 1 best solutions below

0
Vinita Sonakiya On

Deleting the Django tables can cause unexpected behavior. These tables are there for providing specific services.

Tables started with Django have specific role:

  • DJANGO_ADMIN_LOG(maintain change log)
  • DJANGO_CONTENT_TYPE(maintain app mapping)
  • DJANGO_MIGRATIONS (migration status and history)
  • DJANGO_SESSION (django DB sessions)
  • DJANGO_SITE (site details, including url, DNS etc.)

These tables are essential for Django to work properly.

Auth related tables such as

  • AUTH_GROUP
  • AUTH_GROUP_PERMISSIONS
  • AUTH_PERMISSION

these tables maintain auth permissions, auth Group, and group permissions. If you are not using Django Auth, Group or Permissions features you can delete it. But I suggest let it be.

These tables won't affect your code performance.