1. Michael Bayer
  2. alembic
  3. Issues

Issues

Issue #105 duplicate

Cannot make a column a primary key

dwt
created an issue

I can drop the primary key constraint on a column all right with something like

    op.drop_constraint(
        tablename='a_table',
        name='a_column',
        type='primary',
    )

But there is no api to do something like

    op.add_constraint(
        tablename='a_table',
        name='a_column',
        type='primary',
    )

Alternatively create_primary_key_constraint would also be fine but doesn't exist.

Comments (3)

  1. Log in to comment