39 lines
892 B
Python
39 lines
892 B
Python
"""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",
|
|
"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
|