1

I have a model in my code like this:

# test model
class test(db.Model):
     id = db.Column(db.Integer(), primary_key=True)
     message = db.Column(db.String())

id is primary key so it's auto increment and start from 0 and keep increment by one each time.

an by default #sqlalchemy start id from 0 but how can I set it to another number like start id column from 100 and increment by one ?

I search about this but I didn't find any useful post on blogs or websites .

JayPeerachai
  • 3,499
  • 3
  • 14
  • 29
abcdefg
  • 9
  • 2

0 Answers0