Source code for aiida.backends.sqlalchemy.tests.migration_test.versions.b947a8821295_add_a_column

# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved.                     #
# This file is part of the AiiDA code.                                    #
#                                                                         #
# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core #
# For further information on the license, see the LICENSE.txt file        #
# For further information please visit http://www.aiida.net               #
###########################################################################
"""Add a column

Revision ID: b947a8821295
Revises: 470e57bc0936
Create Date: 2017-06-16 18:09:03.152982

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'b947a8821295'
down_revision = '470e57bc0936'
branch_labels = None
depends_on = None


[docs]def upgrade(): op.add_column('account', sa.Column('last_transaction_date', sa.DateTime))
[docs]def downgrade(): op.drop_column('account', 'last_transaction_date')