-
Notifications
You must be signed in to change notification settings - Fork 777
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce persistent browser sessions model (#1408)
- Loading branch information
1 parent
69687f1
commit c97b261
Showing
3 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
alembic/versions/2024_12_17_1841-282b0548d443_introduce_persistent_browser_sessions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
"""introduce persistent browser sessions | ||
Revision ID: 282b0548d443 | ||
Revises: 411dd89f3df9 | ||
Create Date: 2024-12-17 18:41:30.400052+00:00 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "282b0548d443" | ||
down_revision: Union[str, None] = "411dd89f3df9" | ||
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( | ||
"persistent_browser_sessions", | ||
sa.Column("persistent_browser_session_id", sa.String(), nullable=False), | ||
sa.Column("organization_id", sa.String(), nullable=False), | ||
sa.Column("runnable_type", sa.String(), nullable=False), | ||
sa.Column("runnable_id", sa.String(), nullable=False), | ||
sa.Column("created_at", sa.DateTime(), nullable=False), | ||
sa.Column("modified_at", sa.DateTime(), nullable=False), | ||
sa.Column("deleted_at", sa.DateTime(), nullable=True), | ||
sa.ForeignKeyConstraint( | ||
["organization_id"], | ||
["organizations.organization_id"], | ||
), | ||
sa.PrimaryKeyConstraint("persistent_browser_session_id"), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table("persistent_browser_sessions") | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters