forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
1,119 additions
and
125 deletions.
There are no files selected for viewing
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
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
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
56 changes: 56 additions & 0 deletions
56
...axy/model/migrations/alembic/versions_gxy/7ffd33d5d144_implement_structured_tool_state.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,56 @@ | ||
"""implement structured tool state | ||
Revision ID: 7ffd33d5d144 | ||
Revises: eee9229a9765 | ||
Create Date: 2022-11-09 15:53:11.451185 | ||
""" | ||
|
||
from sqlalchemy import ( | ||
Column, | ||
ForeignKey, | ||
Integer, | ||
String, | ||
) | ||
|
||
from galaxy.model.custom_types import JSONType | ||
from galaxy.model.migrations.util import ( | ||
add_column, | ||
create_table, | ||
drop_column, | ||
drop_table, | ||
transaction, | ||
) | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "7ffd33d5d144" | ||
down_revision = "eee9229a9765" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
with transaction(): | ||
create_table( | ||
"tool_source", | ||
Column("id", Integer, primary_key=True), | ||
Column("hash", String(255), index=True), | ||
Column("source", JSONType), | ||
) | ||
create_table( | ||
"tool_request", | ||
Column("id", Integer, primary_key=True), | ||
Column("request", JSONType), | ||
Column("state", String(32)), | ||
Column("state_message", JSONType), | ||
Column("tool_source_id", Integer, ForeignKey("tool_source.id"), index=True), | ||
Column("history_id", Integer, ForeignKey("history.id"), index=True), | ||
) | ||
add_column("job", Column("tool_request_id", Integer, ForeignKey("tool_request.id"), index=True)) | ||
|
||
|
||
def downgrade(): | ||
with transaction(): | ||
drop_column("job", "tool_request_id") | ||
drop_table("tool_request") | ||
drop_table("tool_source") |
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
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
Oops, something went wrong.