|
| 1 | +"""change created to full timestamp |
| 2 | +
|
| 3 | +Revision ID: 396535c9bb98 |
| 4 | +Revises: a37de03e6a59 |
| 5 | +Create Date: 2024-05-20 13:26:06.712928 |
| 6 | +
|
| 7 | +""" |
| 8 | +import sqlalchemy as sa |
| 9 | +from alembic import op |
| 10 | + |
| 11 | +# revision identifiers, used by Alembic. |
| 12 | +revision = '396535c9bb98' |
| 13 | +down_revision = 'a37de03e6a59' |
| 14 | +branch_labels = None |
| 15 | +depends_on = None |
| 16 | + |
| 17 | + |
| 18 | +def upgrade(): |
| 19 | + # ### commands auto generated by Alembic - please adjust! ### |
| 20 | + with op.batch_alter_table('answer', schema=None) as batch_op: |
| 21 | + batch_op.alter_column('created', |
| 22 | + existing_type=sa.DATE(), |
| 23 | + type_=sa.DateTime(), |
| 24 | + existing_nullable=False) |
| 25 | + |
| 26 | + with op.batch_alter_table('consideration', schema=None) as batch_op: |
| 27 | + batch_op.alter_column('created', |
| 28 | + existing_type=sa.DATE(), |
| 29 | + type_=sa.DateTime(), |
| 30 | + existing_nullable=False) |
| 31 | + |
| 32 | + with op.batch_alter_table('note', schema=None) as batch_op: |
| 33 | + batch_op.alter_column('created', |
| 34 | + existing_type=sa.DATE(), |
| 35 | + type_=sa.DateTime(), |
| 36 | + existing_nullable=False) |
| 37 | + |
| 38 | + with op.batch_alter_table('question', schema=None) as batch_op: |
| 39 | + batch_op.alter_column('created', |
| 40 | + existing_type=sa.DATE(), |
| 41 | + type_=sa.DateTime(), |
| 42 | + existing_nullable=False) |
| 43 | + |
| 44 | + # ### end Alembic commands ### |
| 45 | + |
| 46 | + |
| 47 | +def downgrade(): |
| 48 | + # ### commands auto generated by Alembic - please adjust! ### |
| 49 | + with op.batch_alter_table('question', schema=None) as batch_op: |
| 50 | + batch_op.alter_column('created', |
| 51 | + existing_type=sa.DateTime(), |
| 52 | + type_=sa.DATE(), |
| 53 | + existing_nullable=False) |
| 54 | + |
| 55 | + with op.batch_alter_table('note', schema=None) as batch_op: |
| 56 | + batch_op.alter_column('created', |
| 57 | + existing_type=sa.DateTime(), |
| 58 | + type_=sa.DATE(), |
| 59 | + existing_nullable=False) |
| 60 | + |
| 61 | + with op.batch_alter_table('consideration', schema=None) as batch_op: |
| 62 | + batch_op.alter_column('created', |
| 63 | + existing_type=sa.DateTime(), |
| 64 | + type_=sa.DATE(), |
| 65 | + existing_nullable=False) |
| 66 | + |
| 67 | + with op.batch_alter_table('answer', schema=None) as batch_op: |
| 68 | + batch_op.alter_column('created', |
| 69 | + existing_type=sa.DateTime(), |
| 70 | + type_=sa.DATE(), |
| 71 | + existing_nullable=False) |
| 72 | + |
| 73 | + # ### end Alembic commands ### |
0 commit comments