Skip to content

Commit d6e0618

Browse files
authored
Merge pull request piccolo-orm#66 from piccolo-orm/document_id_column
added docs about the id column
2 parents c72d79e + eee98e3 commit d6e0618

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/src/piccolo/schema/defining.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,23 @@ For a full list of columns, see :ref:`ColumnTypes`.
2323

2424
-------------------------------------------------------------------------------
2525

26+
Default columns
27+
---------------
28+
29+
id
30+
~~
31+
32+
Each table is automatically given a ``PrimaryKey`` column called ``id``, which
33+
is an auto incrementing integer.
34+
35+
It is used to uniquely identify a row, and is referenced by ``ForeignKey``
36+
columns on other tables.
37+
38+
If you specify your own ``id`` column, you may get unexpected behaviour, so
39+
it's not recommended at the moment.
40+
41+
-------------------------------------------------------------------------------
42+
2643
Tablename
2744
---------
2845

0 commit comments

Comments
 (0)