[Django] #34422: inspectdb mysql databases

8 views
Skip to first unread message

Django

unread,
Mar 18, 2023, 6:05:56 AM3/18/23
to django-...@googlegroups.com
#34422: inspectdb mysql databases
-------------------------------------+-------------------------------------
Reporter: brun806 | Owner: nobody
Type: Bug | Status: new
Component: | Version: 4.1
Uncategorized | Keywords: inspectdb, mysql,
Severity: Normal | models
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
i think there is some bug in inspectdb command. now when i manually use in
terminal
python manage.py inspectdb > models.py
it generates ONLY models where name starts with “Auth” and “Django”.
when i use
python manage.py inspectdb --database=“data” > models.py
it creates models ONLY for that database.
but previously it generated models for both database and models that are
part of Django’s built-in authentication and content types framework in a
single models.py.
could anybody please explain what is happening and how do i fix it?

--
Ticket URL: <https://code.djangoproject.com/ticket/34422>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 18, 2023, 6:32:30 AM3/18/23
to django-...@googlegroups.com
#34422: inspectdb mysql databases
-------------------------------------+-------------------------------------
Reporter: brun806 | Owner: nobody
Type: Bug | Status: closed
Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution: invalid
Keywords: inspectdb, mysql, | Triage Stage:
models | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => invalid
* component: Uncategorized => Core (Management commands)


Comment:

This isn't a support channel. See TicketClosingReasons/UseSupportChannels
for ways to get help if you can't debug the issue on your own. Feel free
to reopen this issue if you find problem in Django and can explain where
the issue lies.

--
Ticket URL: <https://code.djangoproject.com/ticket/34422#comment:1>

Django

unread,
Mar 18, 2023, 7:37:14 AM3/18/23
to django-...@googlegroups.com
#34422: inspectdb mysql databases
-------------------------------------+-------------------------------------
Reporter: brun806 | Owner: nobody
Type: Bug | Status: new

Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution:
Keywords: inspectdb, mysql, | Triage Stage:
models | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by brun806):

* status: closed => new
* resolution: invalid =>


Old description:

> i think there is some bug in inspectdb command. now when i manually use
> in terminal
> python manage.py inspectdb > models.py
> it generates ONLY models where name starts with “Auth” and “Django”.
> when i use
> python manage.py inspectdb --database=“data” > models.py
> it creates models ONLY for that database.
> but previously it generated models for both database and models that are
> part of Django’s built-in authentication and content types framework in a
> single models.py.
> could anybody please explain what is happening and how do i fix it?

New description:

i think there is some bug in inspectdb command. now when i manually use in
terminal
python manage.py inspectdb > models.py
it generates ONLY models where name starts with “Auth” and “Django”.
when i use
python manage.py inspectdb --database=“data” > models.py
it creates models ONLY for that database.
but previously it generated models for both database and models that are
part of Django’s built-in authentication and content types framework in a
single models.py.

(using Windows 10, MySQL, Python 3.9.1 and Django 4.1.7)

--

Comment:

Ticket was closed by Tim Graham, with "This isn't a support channel. See


TicketClosingReasons/UseSupportChannels for ways to get help if you can't
debug the issue on your own. Feel free to reopen this issue if you find
problem in Django and can explain where the issue lies."

I deleted question and leaved only description of the problem.

--
Ticket URL: <https://code.djangoproject.com/ticket/34422#comment:2>

Django

unread,
Mar 18, 2023, 8:27:12 AM3/18/23
to django-...@googlegroups.com
#34422: inspectdb mysql databases
-------------------------------------+-------------------------------------
Reporter: brun806 | Owner: nobody
Type: Bug | Status: closed

Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution: invalid

Keywords: inspectdb, mysql, | Triage Stage:
models | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => invalid


Comment:

Replying to [ticket:34422 brun806]:


> i think there is some bug in inspectdb command. now when i manually use
in terminal
> python manage.py inspectdb > models.py
> it generates ONLY models where name starts with “Auth” and “Django”.
> when i use
> python manage.py inspectdb --database=“data” > models.py
> it creates models ONLY for that database.
> but previously it generated models for both database and models that are
part of Django’s built-in authentication and content types framework in a
single models.py.
> (using Windows 10, MySQL, Python 3.9.1 and Django 4.1.7)

This is still a support question, and described behavior is expected.
`inspectdb` respects the `database` parameter and use the `default`
database when not provided.
Please don't reopen this ticket and use support channels if you have
further questions/doubts.

--
Ticket URL: <https://code.djangoproject.com/ticket/34422#comment:3>

Reply all
Reply to author
Forward
0 new messages