I have a table with the following column:
id = sa.Column(sa.Integer, sa.Sequence('id_seq'), primary_key=True, nullable=False)
Usually, I have no problems inserting data, but every time I insert rows with specific id, it causes problems with Oracle since the sequence is not modified accordingly.
For example, assuming that the table is new and the sequence starts at 1, if I insert a row specifying id=2, the sequence doesn't change which will cause the next insert to fail.
I do understand that Oracle does not support auto increment but what is the proper way of handling this under sqlalchemy? Do I need to manually change the sequence after such insert statement? can I bind to an event or use any other magic to make it work like other dialects? (choose max(id)+1)
sequence
. – jcho360