#19030: primary key in model is not primary key in database
-------------------------------------+-------------------------------------
Reporter: ccruickshank | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.3
(models, ORM) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by ptone):
Are you using pg_dump?
I'm seeing a block in the generated SQL that looks like:
{{{
ALTER TABLE ONLY dummy_modeltest
ADD CONSTRAINT dummy_modeltest_pkey PRIMARY KEY (pkey);
}}}
using your models
what backend for the engine value of DATABASES setting are you using?
note the PG docs say:
Technically, PRIMARY KEY is merely a combination of UNIQUE and NOT
NULL, but identifying a set of columns as primary key also provides
metadata about the design of the schema, as a primary key implies that
other tables can rely on this set of columns as a unique identifier for
rows.
--
Ticket URL: <https://code.djangoproject.com/ticket/19030#comment:2>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.