the start functionality is unimplemented at the moment. instead, issue:
t = Table("mytable", ....) DDL("CREATE SEQUENCE ....").execute_at('before-create', t) Chris Miles wrote: > > I need to create an explicit Sequence with a specified start value. > Looks simple, I tried Sequence('test_seq', start=5000) however the > actual sequence created is left with the default start value. The > "start" parameter appears to have no effect. > > This is using PostgreSQL 8.2.4 and SQLAlchemy 0.5.3. > > Test code below demonstrates the problem. > > Am I misunderstanding the start parameter or is this a bug? > > ---- > import sqlalchemy as sa > > engine = sa.create_engine('postgres://localhost/test1', echo=True) > meta = sa.MetaData() > meta.bind = engine > > test_seq = sa.Sequence('test_seq', start=5000, metadata=meta) > test_seq.create() > > nextval = engine.execute(test_seq) > > assert nextval == 5000, nextval > ---- > > Cheers, > Chris Miles > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---