Skip to content

Commit

Permalink
Add migration
Browse files Browse the repository at this point in the history
  • Loading branch information
olethanh committed Dec 9, 2024
1 parent 70b7390 commit d919116
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""add gpu table
Revision ID: 5c6ae643c69b
Revises: bbb12a12372e
Create Date: 2024-12-09 19:40:19.279735
"""

import sqlalchemy as sa
from alembic import op

Check warning on line 10 in src/aleph/vm/orchestrator/migrations/versions/5c6ae643c69b_add_gpu_table.py

View check run for this annotation

Codecov / codecov/patch

src/aleph/vm/orchestrator/migrations/versions/5c6ae643c69b_add_gpu_table.py#L9-L10

Added lines #L9 - L10 were not covered by tests

# revision identifiers, used by Alembic.
revision = "5c6ae643c69b"
down_revision = "bbb12a12372e"
branch_labels = None
depends_on = None

Check warning on line 16 in src/aleph/vm/orchestrator/migrations/versions/5c6ae643c69b_add_gpu_table.py

View check run for this annotation

Codecov / codecov/patch

src/aleph/vm/orchestrator/migrations/versions/5c6ae643c69b_add_gpu_table.py#L13-L16

Added lines #L13 - L16 were not covered by tests


def upgrade() -> None:

Check warning on line 19 in src/aleph/vm/orchestrator/migrations/versions/5c6ae643c69b_add_gpu_table.py

View check run for this annotation

Codecov / codecov/patch

src/aleph/vm/orchestrator/migrations/versions/5c6ae643c69b_add_gpu_table.py#L19

Added line #L19 was not covered by tests
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("executions", sa.Column("gpus", sa.JSON(), nullable=True))

Check warning on line 21 in src/aleph/vm/orchestrator/migrations/versions/5c6ae643c69b_add_gpu_table.py

View check run for this annotation

Codecov / codecov/patch

src/aleph/vm/orchestrator/migrations/versions/5c6ae643c69b_add_gpu_table.py#L21

Added line #L21 was not covered by tests
# ### end Alembic commands ###


def downgrade() -> None:

Check warning on line 25 in src/aleph/vm/orchestrator/migrations/versions/5c6ae643c69b_add_gpu_table.py

View check run for this annotation

Codecov / codecov/patch

src/aleph/vm/orchestrator/migrations/versions/5c6ae643c69b_add_gpu_table.py#L25

Added line #L25 was not covered by tests
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("executions", "gpus")

Check warning on line 27 in src/aleph/vm/orchestrator/migrations/versions/5c6ae643c69b_add_gpu_table.py

View check run for this annotation

Codecov / codecov/patch

src/aleph/vm/orchestrator/migrations/versions/5c6ae643c69b_add_gpu_table.py#L27

Added line #L27 was not covered by tests
# ### end Alembic commands ###

0 comments on commit d919116

Please sign in to comment.