"""empty message

Revision ID: 01decae7c1ec
Revises: 
Create Date: 2023-01-05 12:16:58.031981

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '01decae7c1ec'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('activity',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('title', sa.String(length=100), nullable=True),
    sa.Column('description', sa.Text(), nullable=True),
    sa.Column('created', sa.DateTime(), nullable=False),
    sa.Column('recorded', sa.DateTime(), nullable=False),
    sa.Column('tz_local', sa.String(length=40), nullable=False),
    sa.Column('strava_id', sa.BigInteger(), nullable=True),
    sa.Column('distance_m', sa.Float(), nullable=True),
    sa.Column('elevation_m', sa.Integer(), nullable=True),
    sa.Column('elapsed_time_s', sa.Integer(), nullable=False),
    sa.Column('moving_time_s', sa.Integer(), nullable=False),
    sa.Column('intensity_factor', sa.Float(), nullable=True),
    sa.Column('tss', sa.Float(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('strava_id')
    )
    op.create_table('strava_account',
    sa.Column('strava_id', sa.Integer(), nullable=False),
    sa.Column('access_token', sa.String(), nullable=True),
    sa.Column('refresh_token', sa.String(), nullable=True),
    sa.Column('expires_at', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('strava_id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('strava_account')
    op.drop_table('activity')
    # ### end Alembic commands ###
