-
Notifications
You must be signed in to change notification settings - Fork 446
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
12 changed files
with
86 additions
and
185 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
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
39 changes: 39 additions & 0 deletions
39
src/zenml/zen_stores/migrations/versions/5591a5051f51_simplify_model_version_artifacts2.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,39 @@ | ||
"""Simplify model version artifacts2 [5591a5051f51]. | ||
Revision ID: 5591a5051f51 | ||
Revises: ec6307720f92 | ||
Create Date: 2024-11-06 16:51:01.346080 | ||
""" | ||
import sqlmodel | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '5591a5051f51' | ||
down_revision = 'ec6307720f92' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
"""Upgrade database schema and/or data, creating a new revision.""" | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
|
||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
"""Downgrade database schema and/or data back to the previous revision.""" | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('model_versions_runs', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('user_id', sa.CHAR(length=32), nullable=True)) | ||
batch_op.add_column(sa.Column('workspace_id', sa.CHAR(length=32), nullable=False)) | ||
batch_op.add_column(sa.Column('model_id', sa.CHAR(length=32), nullable=False)) | ||
batch_op.create_foreign_key('fk_model_versions_runs_user_id_user', 'user', ['user_id'], ['id'], ondelete='SET NULL') | ||
batch_op.create_foreign_key('fk_model_versions_runs_workspace_id_workspace', 'workspace', ['workspace_id'], ['id'], ondelete='CASCADE') | ||
batch_op.create_foreign_key('fk_model_versions_runs_model_id_model', 'model', ['model_id'], ['id'], ondelete='CASCADE') | ||
|
||
# ### 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.