Skip to content

Commit

Permalink
add alembic version
Browse files Browse the repository at this point in the history
  • Loading branch information
abrichr committed Apr 12, 2023
1 parent b7e7b58 commit 3e531fc
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 1 deletion.
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ We hope that these stubs and suggestions will help you get started with your imp

## Submitting an Issue

Please submit any issues to https://github.com/MLDSAI/PAT/issues with the
Please submit any issues to https://github.com/MLDSAI/puterbot/issues with the
following information:

- Problem description (include any relevant console output and/or screenshots)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
"""add Recording; InputEvent; ScreenShot; WindowEvent
Revision ID: b206c80f7640
Revises:
Create Date: 2023-04-12 18:01:55.287166
"""
from alembic import op
import sqlalchemy as sa


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


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('recording',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('timestamp', sa.Integer(), nullable=True),
sa.Column('monitor_width', sa.Integer(), nullable=True),
sa.Column('monitor_height', sa.Integer(), nullable=True),
sa.Column('double_click_interval_seconds', sa.Numeric(asdecimal=False), nullable=True),
sa.Column('double_click_distance_pixels', sa.Numeric(asdecimal=False), nullable=True),
sa.Column('platform', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('id', name=op.f('pk_recording'))
)
op.create_table('screenshot',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('recording_timestamp', sa.Integer(), nullable=True),
sa.Column('timestamp', sa.Integer(), nullable=True),
sa.Column('png_data', sa.LargeBinary(), nullable=True),
sa.PrimaryKeyConstraint('id', name=op.f('pk_screenshot'))
)
op.create_table('window_event',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('recording_timestamp', sa.Integer(), nullable=True),
sa.Column('timestamp', sa.Integer(), nullable=True),
sa.Column('title', sa.String(), nullable=True),
sa.Column('left', sa.Integer(), nullable=True),
sa.Column('top', sa.Integer(), nullable=True),
sa.Column('width', sa.Integer(), nullable=True),
sa.Column('height', sa.Integer(), nullable=True),
sa.PrimaryKeyConstraint('id', name=op.f('pk_window_event'))
)
op.create_table('input_event',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('timestamp', sa.Integer(), nullable=True),
sa.Column('recording_timestamp', sa.Integer(), nullable=True),
sa.Column('screenshot_timestamp', sa.Integer(), nullable=True),
sa.Column('window_event_timestamp', sa.Integer(), nullable=True),
sa.Column('mouse_x', sa.Numeric(asdecimal=False), nullable=True),
sa.Column('mouse_y', sa.Numeric(asdecimal=False), nullable=True),
sa.Column('mouse_dx', sa.Numeric(asdecimal=False), nullable=True),
sa.Column('mouse_dy', sa.Numeric(asdecimal=False), nullable=True),
sa.Column('mouse_button_name', sa.String(), nullable=True),
sa.Column('mouse_pressed', sa.Boolean(), nullable=True),
sa.Column('key_name', sa.String(), nullable=True),
sa.Column('key_char', sa.String(), nullable=True),
sa.Column('key_vk', sa.String(), nullable=True),
sa.Column('canonical_key_name', sa.String(), nullable=True),
sa.Column('canonical_key_char', sa.String(), nullable=True),
sa.Column('canonical_key_vk', sa.String(), nullable=True),
sa.Column('parent_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['parent_id'], ['input_event.id'], name=op.f('fk_input_event_parent_id_input_event')),
sa.ForeignKeyConstraint(['recording_timestamp'], ['recording.timestamp'], name=op.f('fk_input_event_recording_timestamp_recording')),
sa.ForeignKeyConstraint(['screenshot_timestamp'], ['screenshot.timestamp'], name=op.f('fk_input_event_screenshot_timestamp_screenshot')),
sa.ForeignKeyConstraint(['window_event_timestamp'], ['window_event.timestamp'], name=op.f('fk_input_event_window_event_timestamp_window_event')),
sa.PrimaryKeyConstraint('id', name=op.f('pk_input_event'))
)
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('input_event')
op.drop_table('window_event')
op.drop_table('screenshot')
op.drop_table('recording')
# ### end Alembic commands ###
1 change: 1 addition & 0 deletions puterbot/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Setup

```
git clone https://github.com/MLDSAI/puterbot.git
cd puterbot
python3.10 -m venv .venv
source .venv/bin/activate
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 3e531fc

Please sign in to comment.