Skip to content

Commit 2003479

Browse files
committed
Merge branch 'manufacturer' into development
2 parents eab144c + ca7dbfa commit 2003479

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

db.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ class Elevator(AccessPoint):
125125
floor_min: Mapped[int]
126126
floor_max: Mapped[int]
127127
door_count: Mapped[int] = mapped_column(server_default="1" )
128+
manufacturer: Mapped[str] = mapped_column(nullable=True)
128129

129130
__mapper_args__ = {
130131
"polymorphic_identity": "elevator",
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"""add elevator manufacturer
2+
3+
Revision ID: 6d43d7fbd1b1
4+
Revises: 40f4b882f16c
5+
Create Date: 2026-01-25 13:08:40.578379
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
# revision identifiers, used by Alembic.
13+
revision = '6d43d7fbd1b1'
14+
down_revision = '40f4b882f16c'
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
# ### commands auto generated by Alembic - please adjust! ###
21+
with op.batch_alter_table('elevator', schema=None) as batch_op:
22+
batch_op.add_column(sa.Column('manufacturer', sa.String(), nullable=True))
23+
24+
# ### end Alembic commands ###
25+
26+
27+
def downgrade():
28+
# ### commands auto generated by Alembic - please adjust! ###
29+
30+
with op.batch_alter_table('elevator', schema=None) as batch_op:
31+
batch_op.drop_column('manufacturer')
32+
33+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)