2
0
mirror of https://github.com/codl/forget synced 2024-12-12 00:19:52 +01:00
forget-cancellare-vecchi-toot/migrations/versions/90b5b84abc6a_change_timestamps_to_timestamptzs.py

31 lines
865 B
Python
Raw Normal View History

2017-08-31 18:59:09 +02:00
"""change timestamps to timestamptzs
Revision ID: 90b5b84abc6a
Revises: 6fd1f5b43824
Create Date: 2017-08-31 16:46:16.785021
"""
from alembic import op
from sqlalchemy.types import DateTime
# revision identifiers, used by Alembic.
revision = '90b5b84abc6a'
down_revision = '6fd1f5b43824'
branch_labels = None
depends_on = None
def upgrade():
for table in ('accounts', 'oauth_tokens', 'posts', 'sessions',
'twitter_archives', 'mastodon_apps'):
for column in ('created_at', 'updated_at'):
op.alter_column(table, column, type_=DateTime(timezone=True))
def downgrade():
for table in ('account', 'oauth_tokens', 'posts', 'sessions',
'twitter_archives', 'mastodon_apps'):
for column in ('created_at', 'updated_at'):
op.alter_column(table, column, type_=DateTime(timezone=False))