From 865d6e63ee8cef86db371d216ec2c70082eca043 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 19 2019 09:14:07 +0000 Subject: Add missing alembic revision for ci_username/ci_password In the commit 9c6dee24463fdbfe88c21cfa4a6d7d3af87a5b7c we have added two fields in the database to store the username and password to use when authenticating to jenkins. However, we missed the corresponding alembic revision. This commit fixes this mistake. Signed-off-by: Pierre-Yves Chibon --- diff --git a/alembic/versions/5a2327825b9a_add_ci_username_and_ci_password_to_hook_.py b/alembic/versions/5a2327825b9a_add_ci_username_and_ci_password_to_hook_.py new file mode 100644 index 0000000..1897f4a --- /dev/null +++ b/alembic/versions/5a2327825b9a_add_ci_username_and_ci_password_to_hook_.py @@ -0,0 +1,33 @@ +"""Add ci_username and ci_password to hook_pagure_ci + +Revision ID: 5a2327825b9a +Revises: 1a510f2216c0 +Create Date: 2019-03-19 10:06:25.292081 + +""" + +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '5a2327825b9a' +down_revision = '1a510f2216c0' + + +def upgrade(): + ''' Add the ci_username and ci_password fields to hook_pagure_ci''' + op.add_column( + 'hook_pagure_ci', + sa.Column('ci_username', sa.String(255), nullable=True, unique=False) + ) + op.add_column( + 'hook_pagure_ci', + sa.Column('ci_password', sa.String(255), nullable=True, unique=False) + ) + + +def downgrade(): + ''' Drop the ci_username and ci_password fields from hook_pagure_ci''' + op.drop_column('hook_pagure_ci', 'ci_username') + op.drop_column('hook_pagure_ci', 'ci_password')