Merge branch 'master' into git
This commit is contained in:
commit
93cd459460
27 changed files with 873 additions and 343 deletions
|
@ -0,0 +1,29 @@
|
|||
"""Add revert_tag log entry kind
|
||||
|
||||
Revision ID: 1c3decf6b9c4
|
||||
Revises: 4ce2169efd3b
|
||||
Create Date: 2015-04-16 17:14:11.154856
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '1c3decf6b9c4'
|
||||
down_revision = '4ce2169efd3b'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade(tables):
|
||||
op.bulk_insert(tables.logentrykind,
|
||||
[
|
||||
{'id': 47, 'name':'revert_tag'},
|
||||
])
|
||||
|
||||
|
||||
def downgrade(tables):
|
||||
op.execute(
|
||||
(tables.logentrykind.delete()
|
||||
.where(tables.logentrykind.c.name == op.inline_literal('revert_tag')))
|
||||
|
||||
)
|
|
@ -8,7 +8,7 @@ Create Date: 2015-03-19 14:23:52.604505
|
|||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '214350b6a8b1'
|
||||
down_revision = '2b4dc0818a5e'
|
||||
down_revision = '67eb43c778b'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
"""Add RepositoryActionCount table
|
||||
|
||||
Revision ID: 30c044b75632
|
||||
Revises: 2b4dc0818a5e
|
||||
Create Date: 2015-04-13 13:21:18.159602
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '30c044b75632'
|
||||
down_revision = '2b4dc0818a5e'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade(tables):
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('repositoryactioncount',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('repository_id', sa.Integer(), nullable=False),
|
||||
sa.Column('count', sa.Integer(), nullable=False),
|
||||
sa.Column('date', sa.Date(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['repository_id'], ['repository.id'], name=op.f('fk_repositoryactioncount_repository_id_repository')),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_repositoryactioncount'))
|
||||
)
|
||||
op.create_index('repositoryactioncount_date', 'repositoryactioncount', ['date'], unique=False)
|
||||
op.create_index('repositoryactioncount_repository_id', 'repositoryactioncount', ['repository_id'], unique=False)
|
||||
op.create_index('repositoryactioncount_repository_id_date', 'repositoryactioncount', ['repository_id', 'date'], unique=True)
|
||||
### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade(tables):
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('repositoryactioncount')
|
||||
### end Alembic commands ###
|
|
@ -0,0 +1,26 @@
|
|||
"""Add reversion column to the tags table
|
||||
|
||||
Revision ID: 4ce2169efd3b
|
||||
Revises: 30c044b75632
|
||||
Create Date: 2015-04-16 17:10:16.039835
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '4ce2169efd3b'
|
||||
down_revision = '30c044b75632'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade(tables):
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('repositorytag', sa.Column('reversion', sa.Boolean(), nullable=False))
|
||||
### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade(tables):
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('repositorytag', 'reversion')
|
||||
### end Alembic commands ###
|
|
@ -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 ###
|
Reference in a new issue