Missed a migration.

This commit is contained in:
Dan 2021-01-19 16:47:39 -05:00
parent b3e4bfb3f5
commit 19be071ac1
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
"""empty message
Revision ID: 3983bf3ef8d1
Revises: 86032c036115
Create Date: 2021-01-19 13:38:59.197092
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3983bf3ef8d1'
down_revision = '86032c036115'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('sample', sa.Column('created_on', sa.DateTime(), nullable=True))
op.execute("UPDATE sample SET created_on = date")
op.alter_column('sample', 'created_on', nullable=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('sample', 'created_on')
# ### end Alembic commands ###