"""initial models

Revision ID: b2142d98532d
Revises: 
Create Date: 2024-10-04 12:41:00.097004

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'b2142d98532d'
down_revision: Union[str, None] = None
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('Activitylog',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('request_data', sa.JSON(), nullable=True),
    sa.Column('is_uploaded', sa.Boolean(), nullable=True),
    sa.Column('start_time', sa.DateTime(), nullable=True),
    sa.Column('end_time', sa.DateTime(), nullable=True),
    sa.Column('timestamp', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('Appmonitor',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('app_name', sa.String(), nullable=True),
    sa.Column('active_time', sa.Integer(), nullable=True),
    sa.Column('timestamp', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('S3details',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('org_id', sa.Integer(), nullable=True),
    sa.Column('access_key', sa.String(), nullable=True),
    sa.Column('secret_access_key', sa.String(), nullable=True),
    sa.Column('bucket', sa.String(), nullable=True),
    sa.Column('region', sa.String(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('activity',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('keyboard_count', sa.Integer(), nullable=True),
    sa.Column('keyboard_activity', sa.JSON(), nullable=True),
    sa.Column('mouse_click_count', sa.Integer(), nullable=True),
    sa.Column('mouse_activity', sa.JSON(), nullable=True),
    sa.Column('timestamp', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('orgconfiguration',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('org_id', sa.Integer(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('screenshot_interval', sa.Integer(), nullable=True),
    sa.Column('date', sa.String(), nullable=True),
    sa.Column('appandurlstatus', sa.Integer(), nullable=True),
    sa.Column('ssfrequencystatus', sa.Integer(), nullable=True),
    sa.Column('screenshotblurstatus', sa.Integer(), nullable=True),
    sa.Column('livescreenshotstatus', sa.Integer(), nullable=True),
    sa.Column('idlenotes_status', sa.Integer(), nullable=True),
    sa.Column('break_limit', sa.String(), nullable=True),
    sa.Column('break_status', sa.Integer(), nullable=True),
    sa.Column('notes_char_limit', sa.String(), nullable=True),
    sa.Column('idle_limit', sa.String(), nullable=True),
    sa.Column('can_delete_scrnshots', sa.Integer(), nullable=True),
    sa.Column('restrict_timer_to_jobsite', sa.Integer(), nullable=True),
    sa.Column('todos_files_upload_limit', sa.Integer(), nullable=True),
    sa.Column('todo_file_size_limit', sa.Integer(), nullable=True),
    sa.Column('org_timezone', sa.String(), nullable=True),
    sa.Column('user_timezone', sa.String(), nullable=True),
    sa.Column('user_timezone_gmt', sa.String(), nullable=True),
    sa.Column('user_timezone_gmt_dst', sa.String(), nullable=True),
    sa.Column('user_timezone_gmt_shortcode', sa.String(), nullable=True),
    sa.Column('bulkInvite', sa.Boolean(), nullable=True),
    sa.Column('timeInterval', sa.String(), nullable=True),
    sa.Column('blur_intensity', sa.Integer(), nullable=True),
    sa.Column('img_quality', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('screenshots',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('file_name', sa.String(), nullable=True),
    sa.Column('file_location', sa.String(), nullable=True),
    sa.Column('file_size', sa.String(), nullable=True),
    sa.Column('s3_upload_link', sa.String(), nullable=True),
    sa.Column('is_uploaded', sa.Boolean(), nullable=True),
    sa.Column('blur', sa.Boolean(), nullable=True),
    sa.Column('timestamp', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('userdetail',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('username', sa.String(), nullable=True),
    sa.Column('name', sa.String(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('timezone', sa.String(), nullable=True),
    sa.Column('token', sa.String(), nullable=True),
    sa.Column('org_id', sa.Integer(), nullable=True),
    sa.Column('sd_token', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('userdetail')
    op.drop_table('screenshots')
    op.drop_table('orgconfiguration')
    op.drop_table('activity')
    op.drop_table('S3details')
    op.drop_table('Appmonitor')
    op.drop_table('Activitylog')
    # ### end Alembic commands ###
