mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-31 19:58:46 -04:00
33 lines
981 B
Python
33 lines
981 B
Python
"""empty message
|
|
|
|
Revision ID: 0045_template_stats_update_time
|
|
Revises: 0044_add_template_stats
|
|
Create Date: 2016-04-05 14:32:45.165755
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '0045_template_stats_update_time'
|
|
down_revision = '0044_add_template_stats'
|
|
|
|
import datetime
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.sql import table, column
|
|
|
|
|
|
def upgrade():
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('template_statistics', sa.Column('updated_at', sa.DateTime(), nullable=True))
|
|
updated_at = table('template_statistics', column('updated_at'))
|
|
op.execute(updated_at.update().values(updated_at=datetime.datetime.utcnow()))
|
|
op.alter_column('template_statistics', 'updated_at', nullable=False)
|
|
### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_column('template_statistics', 'updated_at')
|
|
### end Alembic commands ###
|