Friday, May 28, 2021

Re: Tables missing in SQLite but viewable in admin (confusion)

Thanks for responding. 
Here is a screenshot showing them all added to installed apps and also a screenshot of the latest migration from an hour ago.
 


On Friday, May 28, 2021 at 5:02:37 PM UTC-7 trapp...@gmail.com wrote:
Maybe those are not migrated yet,
make sure that all your apps are added to installed_apps list in settings.py , run makemigrations and migrate

On Sat, May 29, 2021 at 1:56 AM Ryan Kite <ryan...@gmail.com> wrote:
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...@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.

--
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/a6737bf9-1d63-4bf3-87da-aa33bd46b19en%40googlegroups.com.

No comments:

Post a Comment