contentdb/migrations/versions/dff4b87e4a76_.py

32 lines
750 B
Python
Raw Normal View History

2020-07-18 02:22:52 +02:00
"""empty message
Revision ID: dff4b87e4a76
Revises: 3a24fc02365e
Create Date: 2020-07-17 23:47:51.096874
"""
import sqlalchemy as sa
2020-12-04 03:23:04 +01:00
from alembic import op
2020-07-18 02:22:52 +02:00
# revision identifiers, used by Alembic.
revision = 'dff4b87e4a76'
down_revision = '3a24fc02365e'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('package', sa.Column('approved_at', sa.DateTime(), nullable=True, server_default=None))
op.execute("""
UPDATE package SET approved_at=created_at WHERE approved;
""")
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('package', 'approved_at')
# ### end Alembic commands ###