diff --git a/data/migrations/versions/67eb43c778b_add_index_for_repository_datetime_to_.py b/data/migrations/versions/67eb43c778b_add_index_for_repository_datetime_to_.py new file mode 100644 index 000000000..00ff374e4 --- /dev/null +++ b/data/migrations/versions/67eb43c778b_add_index_for_repository_datetime_to_.py @@ -0,0 +1,26 @@ +"""add index for repository+datetime to logentry + +Revision ID: 67eb43c778b +Revises: 1c3decf6b9c4 +Create Date: 2015-04-19 16:00:39.126289 + +""" + +# revision identifiers, used by Alembic. +revision = '67eb43c778b' +down_revision = '1c3decf6b9c4' + +from alembic import op +import sqlalchemy as sa + + +def upgrade(tables): + ### commands auto generated by Alembic - please adjust! ### + op.create_index('logentry_repository_id_datetime', 'logentry', ['repository_id', 'datetime'], unique=False) + ### end Alembic commands ### + + +def downgrade(tables): + ### commands auto generated by Alembic - please adjust! ### + op.drop_index('logentry_repository_id_datetime', table_name='logentry') + ### end Alembic commands ###