FitTrackee/fittrackee/migrations/versions/37_4229a42eff8b_add_weights.py

36 lines
599 B
Python
Raw Permalink Normal View History

2024-02-07 14:59:30 +01:00
"""add weights sport
Revision ID: 4229a42eff8b
Revises: 4d51a4ca8001
Create Date: 2024-02-06 21:50:41.072336
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '4229a42eff8b'
down_revision = '4d51a4ca8001'
branch_labels = None
depends_on = None
def upgrade():
op.execute(
"""
INSERT INTO sports (label, is_active, stopped_speed_threshold)
VALUES ('Weights', True, 0.1)
"""
)
def downgrade():
op.execute(
"""
DELETE FROM sports
WHERE label = 'Weights';
"""
)