#31846: inspectdb doesn't handle tables with "id" field and without primary key
-------------------------------------+-------------------------------------
Reporter: François Poulain | Owner: nobody
Type: Uncategorized | Status: closed
Component: Core (Management | Version: 3.0
commands) | Resolution:
Severity: Normal | worksforme
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):
* status: new => closed
* resolution: => worksforme
Comment:
OK, I can't reproduce an issue here.
Create table:
{{{
CREATE TABLE issue (
id INT,
note TEXT
);
}}}
Inspect DB:
{{{
class Issue(models.Model):
id = models.IntegerField(blank=True, null=True)
note = models.TextField(blank=True, null=True)
class Meta:
managed = False
db_table = 'issue'
}}}
No issues :
{{{
$ ./manage.py check
System check identified no issues (0 silenced).
}}}
I've uploaded the sample project for that. If you adjust the DB and then
run `inspectdb` again so that it demonstrates the issue, I'm happy to take
another look.
--
Ticket URL: <https://code.djangoproject.com/ticket/31846#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.a853a3ee4f6cc6f188fc8bb09d530809%40djangoproject.com.