746a1d372012_add_timers.py 872 B

12345678910111213141516171819202122232425262728293031
  1. """add_timers
  2. Revision ID: 746a1d372012
  3. Revises: fd5e49a12374
  4. Create Date: 2020-03-29 17:24:53.810328
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = '746a1d372012'
  10. down_revision = 'fd5e49a12374'
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. # ### commands auto generated by Alembic - please adjust! ###
  15. op.add_column('users', sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True))
  16. op.add_column('users', sa.Column('updated_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True))
  17. # ### end Alembic commands ###
  18. def downgrade():
  19. # ### commands auto generated by Alembic - please adjust! ###
  20. op.drop_column('users', 'updated_at')
  21. op.drop_column('users', 'created_at')
  22. # ### end Alembic commands ###