Add migration to add gitlab trigger type
This commit is contained in:
parent
c8d3ded95a
commit
c89760278f
1 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,25 @@
|
|||
"""Add gitlab trigger type
|
||||
|
||||
Revision ID: 1f116e06b68
|
||||
Revises: 313179799c8b
|
||||
Create Date: 2015-05-03 10:45:06.257913
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '1f116e06b68'
|
||||
down_revision = '313179799c8b'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade(tables):
|
||||
op.bulk_insert(tables.buildtriggerservice, [{'id': 4, 'name': 'gitlab'}])
|
||||
|
||||
|
||||
def downgrade(tables):
|
||||
op.execute(
|
||||
tables.buildtriggerservice.delete()
|
||||
.where(tables.buildtriggerservice.c.name == op.inline_literal('gitlab'))
|
||||
)
|
Reference in a new issue