Re: [sqlalchemy] how to set the initial value for auto_increment?

2012-04-19 Thread Michael Bayer
SQLite doesn't support an initial value for auto-incrementing fields. It has two flavors of autoincrement, the ROWID and AUTOINCREMENT versions. By setting sqlite_autoincrement it means you're choosing AUTOINCREMENT. But neither support a way to set the initial value, see http://sqlite.

[sqlalchemy] how to set the initial value for auto_increment?

2012-04-19 Thread Phoebe pei
class MyMode(Base): __tablename__ = 'mymodel' __table_args__ = ({ 'sqlite_autoincrement' : True, }) id = Column(Integer, primary_key=True) def __init__(self, id): self.id = id How can I set the initial value for the id column? -- You received this message because you are subscribed to the Goog