"""Add columns for more bot properties

Revision ID: 724839f8ee12
Revises: 
Create Date: 2025-01-13 18:19:23.441855

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '724839f8ee12'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('Users',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('username', sa.String(length=64), nullable=True),
    sa.Column('email', sa.String(length=64), nullable=True),
    sa.Column('password', sa.LargeBinary(), nullable=True),
    sa.Column('oauth_github', sa.String(length=100), nullable=True),
    sa.Column('interaction_count', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('username')
    )
    op.create_table('ConfigUpdates',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('insta_username', sa.String(length=64), nullable=False),
    sa.Column('followers_count', sa.String(length=64), nullable=True),
    sa.Column('following_count', sa.String(length=64), nullable=True),
    sa.Column('posts_count', sa.String(length=64), nullable=True),
    sa.Column('app_id', sa.String(length=64), nullable=True),
    sa.Column('speed_multiplier', sa.String(length=64), nullable=True),
    sa.Column('use_cloned_app', sa.Boolean(), nullable=True),
    sa.Column('allow_untested_ig_version', sa.Boolean(), nullable=True),
    sa.Column('screen_sleep', sa.Boolean(), nullable=True),
    sa.Column('screen_record', sa.Boolean(), nullable=True),
    sa.Column('debug', sa.Boolean(), nullable=True),
    sa.Column('close_apps', sa.Boolean(), nullable=True),
    sa.Column('kill_atx_agent', sa.Boolean(), nullable=True),
    sa.Column('restart_atx_agent', sa.Boolean(), nullable=True),
    sa.Column('disable_block_detection', sa.Boolean(), nullable=True),
    sa.Column('disable_filters', sa.Boolean(), nullable=True),
    sa.Column('dont_type', sa.Boolean(), nullable=True),
    sa.Column('total_crashes_limit', sa.String(length=64), nullable=True),
    sa.Column('truncate_sources', sa.String(length=64), nullable=True),
    sa.Column('count_app_crashes', sa.Boolean(), nullable=True),
    sa.Column('shuffle_jobs', sa.Boolean(), nullable=True),
    sa.Column('blogger_followers', sa.JSON(), nullable=True),
    sa.Column('blogger_following', sa.JSON(), nullable=True),
    sa.Column('blogger_post_likers', sa.JSON(), nullable=True),
    sa.Column('blogger', sa.JSON(), nullable=True),
    sa.Column('hashtag_likers_top', sa.JSON(), nullable=True),
    sa.Column('hashtag_likers_recent', sa.JSON(), nullable=True),
    sa.Column('hashtag_posts_top', sa.JSON(), nullable=True),
    sa.Column('hashtag_posts_recent', sa.JSON(), nullable=True),
    sa.Column('place_posts_top', sa.JSON(), nullable=True),
    sa.Column('place_posts_recent', sa.JSON(), nullable=True),
    sa.Column('place_likers_top', sa.JSON(), nullable=True),
    sa.Column('place_likers_recent', sa.JSON(), nullable=True),
    sa.Column('interact_from_file', sa.JSON(), nullable=True),
    sa.Column('posts_from_file', sa.JSON(), nullable=True),
    sa.Column('delete_interacted_users', sa.Boolean(), nullable=True),
    sa.Column('working_hours', sa.JSON(), nullable=True),
    sa.Column('watch_video_time', sa.String(length=64), nullable=True),
    sa.Column('watch_photo_time', sa.String(length=64), nullable=True),
    sa.Column('feed_likes', sa.String(length=64), nullable=True),
    sa.Column('unfollow', sa.String(length=64), nullable=True),
    sa.Column('unfollow_any', sa.String(length=64), nullable=True),
    sa.Column('unfollow_non_followers', sa.String(length=64), nullable=True),
    sa.Column('unfollow_any_non_followers', sa.String(length=64), nullable=True),
    sa.Column('unfollow_any_followers', sa.String(length=64), nullable=True),
    sa.Column('unfollow_from_file', sa.JSON(), nullable=True),
    sa.Column('sort_followers', sa.Boolean(), nullable=True),
    sa.Column('unfollow_delay', sa.String(length=64), nullable=True),
    sa.Column('remove_followers_from_file', sa.JSON(), nullable=True),
    sa.Column('delete_removed_followers', sa.Boolean(), nullable=True),
    sa.Column('interactions_count', sa.String(length=64), nullable=True),
    sa.Column('likes_count', sa.String(length=64), nullable=True),
    sa.Column('likes_percentage', sa.String(length=64), nullable=True),
    sa.Column('stories_count', sa.String(length=64), nullable=True),
    sa.Column('stories_percentage', sa.String(length=64), nullable=True),
    sa.Column('max_comments_pro_user', sa.String(length=64), nullable=True),
    sa.Column('interact_percentage', sa.String(length=64), nullable=True),
    sa.Column('follow_percentage', sa.String(length=64), nullable=True),
    sa.Column('follow_limit', sa.String(length=64), nullable=True),
    sa.Column('skipped_list_limit', sa.String(length=64), nullable=True),
    sa.Column('skipped_posts_limit', sa.String(length=64), nullable=True),
    sa.Column('min_following', sa.String(length=64), nullable=True),
    sa.Column('total_likes_limit', sa.String(length=64), nullable=True),
    sa.Column('total_follows_limit', sa.String(length=64), nullable=True),
    sa.Column('total_unfollows_limit', sa.String(length=64), nullable=True),
    sa.Column('total_watches_limit', sa.String(length=64), nullable=True),
    sa.Column('total_successful_interactions_limit', sa.String(length=64), nullable=True),
    sa.Column('total_interactions_limit', sa.String(length=64), nullable=True),
    sa.Column('total_comments_limit', sa.String(length=64), nullable=True),
    sa.Column('total_pm_limit', sa.String(length=64), nullable=True),
    sa.Column('end_if_likes_limit_reached', sa.Boolean(), nullable=True),
    sa.Column('end_if_follows_limit_reached', sa.Boolean(), nullable=True),
    sa.Column('end_if_watches_limit_reached', sa.Boolean(), nullable=True),
    sa.Column('end_if_comments_limit_reached', sa.Boolean(), nullable=True),
    sa.Column('end_if_pm_limit_reached', sa.Boolean(), nullable=True),
    sa.Column('repeat', sa.String(length=64), nullable=True),
    sa.Column('total_sessions', sa.String(length=64), nullable=True),
    sa.Column('time_delta', sa.String(length=64), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['Users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('flask_dance_oauth',
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('provider', sa.String(length=50), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=False),
    sa.Column('token', sa.JSON(), nullable=False),
    sa.ForeignKeyConstraint(['user_id'], ['Users.id'], ondelete='cascade'),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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