"""Changed type of datefield from date to datetime

Revision ID: cd16bf2b6eba
Revises: 6273e5f2282d
Create Date: 2016-11-10 19:00:49.951469

"""

# revision identifiers, used by Alembic.
revision = 'cd16bf2b6eba'
down_revision = '6273e5f2282d'

from alembic import op
import sqlalchemy as sa


INSERTS = """"""
DELETES = """"""


def iter_statements(stmts):
    for st in [x for x in stmts.split('\n') if x]:
        op.execute(st)


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('activitys', 'date',
               existing_type=sa.DATE(),
               type_=sa.DateTime(),
               existing_nullable=True)
    ### end Alembic commands ###
    iter_statements(INSERTS)


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('activitys', 'date',
               existing_type=sa.DateTime(),
               type_=sa.DATE(),
               existing_nullable=True)
    ### end Alembic commands ###
    iter_statements(DELETES)
