From 14be83800c6c573b7ba40ab45791031caf0369f8 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 13 2016 06:47:20 +0000 Subject: Add the alembic migration script to add the report field to the project table --- diff --git a/alembic/versions/1640c7d75e5f_add_reports_field_to_project.py b/alembic/versions/1640c7d75e5f_add_reports_field_to_project.py new file mode 100644 index 0000000..126a197 --- /dev/null +++ b/alembic/versions/1640c7d75e5f_add_reports_field_to_project.py @@ -0,0 +1,29 @@ +"""Add reports field to project + +Revision ID: 1640c7d75e5f +Revises: 350efb3f6baf +Create Date: 2016-09-09 16:11:28.099423 + +""" + +# revision identifiers, used by Alembic. +revision = '1640c7d75e5f' +down_revision = '350efb3f6baf' + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + ''' Add the column _reports to the table projects + ''' + op.add_column( + 'projects', + sa.Column('_reports', sa.Text, nullable=True) + ) + + +def downgrade(): + ''' Drop the column _reports from the table projects. + ''' + op.drop_column('projects', '_reports')