"""Updates the Dataset primary keys.

Revision ID: cc54842bb6ba
Revises: 129ff3ce9247
Create Date: 2019-09-19 15:10:26.146940

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'cc54842bb6ba'
down_revision = '129ff3ce9247'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.execute('ALTER TABLE dataset_entry DROP CONSTRAINT dataset_entry_pkey')
    op.create_primary_key(None, 'dataset_entry', ['dataset_id', 'name'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.execute('ALTER TABLE dataset_entry DROP CONSTRAINT dataset_entry_pkey')
    op.create_primary_key(None, 'dataset_entry', ['dataset_id', 'molecule_id'])
    # ### end Alembic commands ###
