0👍
✅
Ricola3D linked me to the same question (that’s answered) that explains my problem.
1👍
Maybe the example from the docs can bring some light into your question
Technically, a primary key constraint is simply a combination of a
unique constraint and a not-null constraint. So, the following two
table definitions accept the same data:CREATE TABLE products ( product_no integer UNIQUE NOT NULL, name text, price numeric ); CREATE TABLE products ( product_no integer PRIMARY KEY, name text, price numeric );
[…] A primary key indicates that a column or group of columns can be
used as a unique identifier for rows in the table […] Adding a
primary key will automatically create a unique btree index on the
column or group of columns used in the primary key. […]
- [Answer]-Why "django-admin.py startproject myproject" doesn't create a project but instead open django-admin.py in Eclipse?
- [Answer]-How to save ForeignKey in queryset? 'NoneType' object has no attribute 'myfield'
Source:stackexchange.com