# 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.

```sql
SELECT MAX(id) FROM stock_price;
```

```sql
ALTER SEQUENCE stock_price_id_seq START WITH 245000;
```

```sql
ALTER SEQUENCE stock_price_id_seq RESTART;
```
