Skip to content

Commit 1ce52f9

Browse files
Update PrimaryKey deprecation warning (piccolo-orm#176)
* Update PrimaryKey deprecation warning * tweaks to deprecation warning Co-authored-by: Daniel Townsend <[email protected]>
1 parent e0af323 commit 1ce52f9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

piccolo/columns/column_types.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,11 @@ def __init__(self, **kwargs) -> None:
529529
kwargs.update({"primary_key": True, "index": False})
530530

531531
colored_warning(
532-
"`PrimaryKey` is deprecated and "
533-
"will be removed in future versions.",
532+
"`PrimaryKey` is deprecated and will be removed in future "
533+
"versions. Use `UUID(primary_key=True)` or "
534+
"`Serial(primary_key=True)` instead. If no primary key column is "
535+
"specified, Piccolo will automatically add one for you called "
536+
"`id`.",
534537
category=DeprecationWarning,
535538
)
536539

0 commit comments

Comments
 (0)