2020-07-22 23:58:56 +02:00
|
|
|
"""rename modified to updated
|
|
|
|
|
|
|
|
Revision ID: 05f3ae5db7c7
|
|
|
|
Revises: 970563653ece
|
|
|
|
Create Date: 2020-07-22 23:56:38.694837
|
|
|
|
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = "05f3ae5db7c7"
|
|
|
|
down_revision = "970563653ece"
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
tables = {
|
|
|
|
"cities": "modified",
|
|
|
|
"games": "modified",
|
|
|
|
"payments": "modified",
|
|
|
|
"player_availabilities": "modified",
|
|
|
|
"player_cancel_games": "modified",
|
|
|
|
"purchase_games": "modified",
|
|
|
|
"sports": "modified",
|
|
|
|
"teams": "modified",
|
|
|
|
"user_ratings": "modified",
|
2020-09-10 23:59:06 +02:00
|
|
|
"users": "modified",
|
2020-07-22 23:58:56 +02:00
|
|
|
"venues": "modified",
|
|
|
|
}
|
|
|
|
for table, field in tables.items():
|
|
|
|
with op.batch_alter_table(table) as batch_op:
|
|
|
|
batch_op.alter_column(column_name=field, new_column_name="updated")
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
pass
|