Integrated gaurded ai via websocket frontend.

modified:   app.py
	new file:   migrations/versions/d04950c5a624_add_activitystate_table2.py
	new file:   migrations/versions/d3631b8bb652_add_activitystate_table.py
This commit is contained in:
Russell Ballestrini 2024-07-27 10:30:07 -04:00
parent 15ac4fa015
commit 6dff9dc6e9
3 changed files with 427 additions and 0 deletions

View file

@ -0,0 +1,34 @@
"""Add ActivityState table2
Revision ID: d04950c5a624
Revises: d3631b8bb652
Create Date: 2024-07-27 09:36:50.422693
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "d04950c5a624"
down_revision = "d3631b8bb652"
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("activity_state", schema=None) as batch_op:
batch_op.add_column(
sa.Column("s3_file_path", sa.String(length=256), nullable=False)
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("activity_state", schema=None) as batch_op:
batch_op.drop_column("s3_file_path")
# ### end Alembic commands ###

View file

@ -0,0 +1,41 @@
"""Add ActivityState table
Revision ID: d3631b8bb652
Revises: 190d5ef26e20
Create Date: 2024-07-27 09:33:52.544550
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "d3631b8bb652"
down_revision = "190d5ef26e20"
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"activity_state",
sa.Column("id", sa.Integer(), nullable=False),
sa.Column("room_id", sa.Integer(), nullable=False),
sa.Column("section_id", sa.String(length=128), nullable=False),
sa.Column("step_id", sa.String(length=128), nullable=False),
sa.Column("attempts", sa.Integer(), nullable=True),
sa.Column("max_attempts", sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(
["room_id"],
["room.id"],
),
sa.PrimaryKeyConstraint("id"),
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table("activity_state")
# ### end Alembic commands ###