Friday, May 28, 2021

Tables missing in SQLite but viewable in admin (confusion)

Greetings!

Am very confused about why the local dev SQLite DB 'appears' to be missing several tables.

In the Django Admin they exist and have data. 

I would be expecting to see the following tables in the DB but can't find them.
(These are the model names since I don't know what the table name look like yet.) 
  • Model: Allergies | Table: ?
  • Model: DoctorsAndProviders | Table: ?
  • Model: FamilyContacts | Table: ?
  • Model: PastSurgicalHistory | Table: ?
  • Model: HealthProfile | Table: ?
But, I do see these two models with their tables in the DB
  • Model: Med | Table: meds
  • Model: PastMedicalHistory  | Table: past_med_hx

The application seems to be working for the most part, we can still add and remove objects. But was encountering errors when trying to build a ForeignKey from the Allergies model to the HealthProfile Model that lives under the Users app. The error said something along the lines about the ID did not exist in the table? Which caused me to view the DB and notice this. 

Any help appreciated :)

screenshots attached.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9f7fecd6-b152-4e6d-8a9e-d22508b9d975n%40googlegroups.com.

No comments:

Post a Comment