Closed Jaymon closed 1 year ago
I recently had a need in a test to mess with the auto-increments and this is what I did:
Foo.interface.query( "ALTER SEQUENCE {}__id_seq RESTART WITH 218832".format(Foo.table_name), ignore_result=True ) Bar.interface.query( "ALTER SEQUENCE {}__id_seq RESTART WITH 24".format(Bar.table_name), ignore_result=True )
It would be great if this was codified into the Interface, it could also discover the field's primary key name.
helpful link
I've never needed to do this since and I don't think it needs to be codified into the interface and I don't think this issue needs to stay open
I recently had a need in a test to mess with the auto-increments and this is what I did:
It would be great if this was codified into the Interface, it could also discover the field's primary key name.
helpful link