-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add short_name to entity_type so that Asset Types can have short name…
…s in the UI. (#823) Co-authored-by: scott <[email protected]> Co-authored-by: Evan Blaudy <[email protected]>
- Loading branch information
1 parent
c37966e
commit 706292e
Showing
2 changed files
with
34 additions
and
0 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
33 changes: 33 additions & 0 deletions
33
zou/migrations/versions/971dbf5a0faf_add_short_name_for_asset_type_entity_.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,33 @@ | ||
"""Add short_name for Asset Type entity_type | ||
Revision ID: 971dbf5a0faf | ||
Revises: 1bb55759146f | ||
Create Date: 2024-06-20 19:51:15.758780 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import sqlalchemy_utils | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '971dbf5a0faf' | ||
down_revision = '1bb55759146f' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"entity_type", | ||
sa.Column("short_name", sa.String(length=20), nullable=True), | ||
) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("entity_type", "short_name") | ||
# ### end Alembic commands ### |