36 lines
599 B
Python
36 lines
599 B
Python
|
"""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';
|
||
|
"""
|
||
|
)
|