Okay, so this worked:
op.execute(CreateSequence(Sequence("observation_id_seq")))
op.add_column('observation', sa.Column(
'id', sa.Integer(), nullable=False,
server_default=sa.text("nextval('observation_id_seq'::regclass)")
))
op.drop_constraint('observation_pkey',
So, I screwed up and realised I really want an auto-incrementing integer
as the primary key for a bunch of tables.
I've changed my models, got all the tests passing and now I need to get
the migrations done, I have:
op.add_column('observation',
sa.Column('id', sa.Integer(),