"""chng_default_dt

Revision ID: 5e35694cdba
Revises: 43b646fd9f17
Create Date: 2017-08-23 14:19:50.467309

"""

# revision identifiers, used by Alembic.
revision = '5e35694cdba'
down_revision = '43b646fd9f17'

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column(u'content_podcast', sa.Column('date_created', sa.DateTime(timezone=True), server_default='now()', nullable=True))
    op.alter_column(u'content_podcast', 'updated_at',
               existing_type=postgresql.TIMESTAMP(timezone=True),
               nullable=True,
               existing_server_default="2017-01-11 21:14:53.469648+00'::timestamp with time zone")
    op.add_column(u'content_podcastdownload', sa.Column('date_downloaded', sa.DateTime(timezone=True), server_default='now()', nullable=True))
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column(u'content_podcastdownload', 'date_downloaded')
    op.alter_column(u'content_podcast', 'updated_at',
               existing_type=postgresql.TIMESTAMP(timezone=True),
               nullable=False,
               existing_server_default="2017-01-11 21:14:53.469648+00'::timestamp with time zone")
    op.drop_column(u'content_podcast', 'date_created')
    ### end Alembic commands ###
