Browse Source

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 <pingou@pingoured.fr>
Pierre-Yves Chibon 5 years ago
parent
commit
865d6e63ee

+ 33 - 0
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')