-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from bento-platform/refact/remove-bundles
refact!: remove bundles (deprecated part of spec)
- Loading branch information
Showing
12 changed files
with
138 additions
and
289 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
from bento_lib.service_info.helpers import build_service_type | ||
from chord_drs import __version__ | ||
|
||
__all__ = [ | ||
"BENTO_SERVICE_KIND", | ||
"SERVICE_NAME", | ||
"SERVICE_ARTIFACT", | ||
"DRS_SPEC_VERSION", | ||
"SERVICE_TYPE", | ||
] | ||
|
||
BENTO_SERVICE_KIND = "drs" | ||
SERVICE_NAME = "Bento Data Repository Service" | ||
SERVICE_ARTIFACT = BENTO_SERVICE_KIND | ||
SERVICE_TYPE = build_service_type("ca.c3g.chord", SERVICE_ARTIFACT, __version__) | ||
DRS_SPEC_VERSION = "1.4.0" # update to match whatever version of the DRS spec is implemented. | ||
SERVICE_TYPE = build_service_type("org.ga4gh", SERVICE_ARTIFACT, DRS_SPEC_VERSION) |
59 changes: 59 additions & 0 deletions
59
chord_drs/migrations/versions/5e982af5cde4_remove_bundles.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,59 @@ | ||
"""remove bundles | ||
Revision ID: 5e982af5cde4 | ||
Revises: dcd501398d46 | ||
Create Date: 2024-07-17 19:54:03.564099 | ||
""" | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "5e982af5cde4" | ||
down_revision = "dcd501398d46" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
|
||
with op.batch_alter_table("drs_object", schema=None) as batch_op: | ||
batch_op.drop_constraint(None, type_="foreignkey") | ||
batch_op.drop_column("bundle_id") | ||
|
||
op.drop_table("drs_bundle") | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
|
||
op.create_table( | ||
"drs_bundle", | ||
sa.Column("id", sa.VARCHAR(), nullable=False), | ||
sa.Column("created", sa.DATETIME(), server_default=sa.text("(CURRENT_TIMESTAMP)"), nullable=True), | ||
sa.Column("checksum", sa.VARCHAR(length=64), nullable=False), | ||
sa.Column("size", sa.INTEGER(), nullable=True), | ||
sa.Column("name", sa.VARCHAR(length=250), nullable=True), | ||
sa.Column("description", sa.VARCHAR(length=1000), nullable=True), | ||
sa.Column("parent_bundle_id", sa.INTEGER(), nullable=True), | ||
sa.Column("project_id", sa.VARCHAR(length=64), nullable=True), | ||
sa.Column("dataset_id", sa.VARCHAR(length=64), nullable=True), | ||
sa.Column("data_type", sa.VARCHAR(length=24), nullable=True), | ||
sa.Column("public", sa.BOOLEAN(), server_default=sa.text("0"), nullable=False), | ||
sa.ForeignKeyConstraint( | ||
["parent_bundle_id"], | ||
["drs_bundle.id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
|
||
with op.batch_alter_table("drs_object", schema=None) as batch_op: | ||
batch_op.add_column(sa.Column("bundle_id", sa.INTEGER(), nullable=True)) | ||
batch_op.create_foreign_key(None, "drs_bundle", ["bundle_id"], ["id"]) | ||
|
||
# ### 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
Oops, something went wrong.