My class for the table topics is as below. The primary key is autogenerated serial key. While testing, I deleted rows from the table and was trying to re-insert them again. The UUID is not getting reset.
class Topics(db.Model): """ User Model for different topics """ __tablename__ = 'topics' uuid = db.Column(db.Integer, primary_key=True) topics_name = db.Column(db.String(256),index=True) def __repr__(self): return '<Post %r>' % self.topics_name I tried the below command to reset the key
ALTER SEQUENCE topics_uuid_seq RESTART WITH 1; It did not work.
I would appreciate any form of suggestion!