---
title: "Discussion on \"Django Key (id)=(244584) already exists, Django unique constraint primary key\" | Hashnode"
description: "Discussion on \"Django Key (id)=(244584) already exists, Django unique constraint primary key\". Replace stock_price with the table name on which you got the unique constraint issues.\nSELECT MAX(id) FROM stock_price;\n\nALTER SEQUENCE stock_price_id_seq START WITH 245000;\n\nALTER SEQUENCE stock_price_id_seq RESTART;"
url: "https://hashnode.com/posts/django-key-id244584-already-exists-django-unique-constraint-primary-key/63c80d82b3c2140d2eeba476"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Django Key (id)=(244584) already exists, Django unique constraint primary key](https://blog.rajeshpudasaini.com.np/django-key-id244584-already-exists-django-unique-constraint-primary-key?utm_source=hashnode&utm_medium=feed)

Replace stock\_price with the table name on which you got the unique constraint issues. SELECT MAX(id) FROM stock\_price; ALTER SEQUENCE stock\_price\_id\_seq START WITH 245000; ALTER SEQUENCE stock\_price\_id\_seq RESTART;

Jan 18, 2023 · 1 min read · blog.rajeshpudasaini.com.np  
Read the article

-   [#django](https://hashnode.com/tag/django)
-   [#python](https://hashnode.com/tag/python)
-   [#issue](https://hashnode.com/tag/issue)

## Written by

[Razyesh Pudasaini](https://hashnode.com/@razyesh)

@razyesh · Kathmandu, Nepal

  
[View profile](https://hashnode.com/@razyesh)

python

I am software developer based on Kathmandu, Nepal.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
