# Understanding Legacy DB Connection & django\_ Created Tables

**URL:** <https://forum.djangoproject.com/t/understanding-legacy-db-connection-django-created-tables/39730>\
**Category:** Getting Started\
**Created:** [March 20, 2025, 3:43pm UTC](https://forum.djangoproject.com/t/understanding-legacy-db-connection-django-created-tables/39730 "2025-03-20T15:43:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![twist2](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/twist2/32/27624_2.png) [@twist2](https://forum.djangoproject.com/u/twist2)\
**Post date:** [March 20, 2025, 3:43pm UTC](https://forum.djangoproject.com/t/understanding-legacy-db-connection-django-created-tables/39730/1 "2025-03-20T15:43:31Z")

</div>

Before I make a huge mess, can someone help me understand what will happen when I connect my application to a legacy (Oracle) database and the Django installation tables, such as django\_admin\_login, auth\_group\__, auth\_user_. After running inspectdb to create the Models, what will happen when I run migrations, will the django\_ tables be added to that Oracle database? Or where will the other\* tables live?

Thanks!

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [March 20, 2025, 3:58pm UTC](https://forum.djangoproject.com/t/understanding-legacy-db-connection-django-created-tables/39730/2 "2025-03-20T15:58:09Z")

</div>

Welcome @twist2 !

The direct answer is that it will be whatever you want it to be. What _that_ is, will depend upon what you’re trying to do here.

If you want your project to access that Oracle database as a “read-only” (“reference”) db, then you would want to set it up as a secondary database. Seehttps://docs.djangoproject.com/en/5.1/topics/db/multi-db/

If you are not in control of that database, then you do **not** want to run migrations on it. After running inspectdb and fixing it, ensure that the `Meta` class has `managed = False` on every table.

And, you’ll still want to have a database for your Django-required and your own models that you may need to create.

(We do this frequently - we have a number of projects accessing application databases that are used by other systems.)
