--
Ticket URL: <https://code.djangoproject.com/ticket/32234>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
* easy: 1 => 0
* owner: nobody => Damien
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
Comment:
`inspectdb` is meant as a shortcut, not as definitive model generation. I
would rather add a comment to the field's `notes` like we do in other
cases. Raising a warning can be really annoying when you try to inspect a
legacy database.
--
Ticket URL: <https://code.djangoproject.com/ticket/32234#comment:1>
* type: New feature => Cleanup/optimization
* component: Database layer (models, ORM) => Core (Management commands)
--
Ticket URL: <https://code.djangoproject.com/ticket/32234#comment:2>
Old description:
> Since django does not support multiple multiple-column primary keys,
> there should be a warning that the inspectdb result does not match
> exactly the database
New description:
Since django does not support multiple multiple-column primary keys, there
should be a warning that the inspectdb result does not match exactly the
database
[https://github.com/django/django/pull/13736 PR]
--
--
Ticket URL: <https://code.djangoproject.com/ticket/32234#comment:3>
Comment (by Damien):
Updated the PR to change the warning to be a comment instead of printing
it to stderr
--
Ticket URL: <https://code.djangoproject.com/ticket/32234#comment:4>
* cc: Ad Timmering (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/32234#comment:5>
* owner: Damien => Anvesh Mishra
--
Ticket URL: <https://code.djangoproject.com/ticket/32234#comment:6>
Comment (by Anvesh Mishra):
I actually found a solution to this in SQLite3 through `PRAGMA` keyword
but since `PRAGMA` is a SQLite3 specific command so my PR didn't passed
the Jenkins tests https://github.com/django/django/pull/15683. If you
could provide any suggestions cause if we use any of the introspection
methods it only takes the first column as primary key and gives no info if
there were other primary-key columns. Also I tried the changes given in PR
https://github.com/django/django/pull/13736 but they didn't work.
--
Ticket URL: <https://code.djangoproject.com/ticket/32234#comment:7>
Comment (by Anvesh Mishra):
Submitted a new PR with all the required changes.
https://github.com/django/django/pull/15730
--
Ticket URL: <https://code.djangoproject.com/ticket/32234#comment:8>
* needs_docs: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32234#comment:9>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
* needs_tests: 1 => 0
* needs_docs: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/32234#comment:10>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"295249c901e13ec1703ada5c414cd97aba72f3e9" 295249c]:
{{{
#!CommitTicketReference repository=""
revision="295249c901e13ec1703ada5c414cd97aba72f3e9"
Fixed #32234 -- Made inspectdb inform about composite primary keys.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32234#comment:11>
Comment (by GitHub <noreply@…>):
In [changeset:"9a3b7e5e2be751d28b8782ad23a63e1c75f27e24" 9a3b7e5e]:
{{{
#!CommitTicketReference repository=""
revision="9a3b7e5e2be751d28b8782ad23a63e1c75f27e24"
Refs #32234 -- Removed hardcoded IntegerField in inspectdb test.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32234#comment:12>