diff --git a/data/migrations/versions/88e0f440a2f_add_created_field_to_the_blobupload_.py b/data/migrations/versions/88e0f440a2f_add_created_field_to_the_blobupload_.py index ab9c63585..1d4241b89 100644 --- a/data/migrations/versions/88e0f440a2f_add_created_field_to_the_blobupload_.py +++ b/data/migrations/versions/88e0f440a2f_add_created_field_to_the_blobupload_.py @@ -12,10 +12,12 @@ down_revision = '403d02fea323' from alembic import op import sqlalchemy as sa +from datetime import datetime def upgrade(tables): ### commands auto generated by Alembic - please adjust! ### - op.add_column('blobupload', sa.Column('created', sa.DateTime(), nullable=False, server_default=sa.text('now()'))) + now = datetime.now().strftime('%Y-%m-%d %H:%M:%S') + op.add_column('blobupload', sa.Column('created', sa.DateTime(), nullable=False, server_default=sa.text(now))) op.create_index('blobupload_created', 'blobupload', ['created'], unique=False) ### end Alembic commands ###