add PhoneNumber.comment column
This commit is contained in:
parent
127f8daad7
commit
bc2f9ad45f
|
@ -2729,6 +2729,9 @@ class PhoneNumber(Base, ModelMixin):
|
||||||
|
|
||||||
active = sa.Column(sa.Boolean, nullable=False, default=True)
|
active = sa.Column(sa.Boolean, nullable=False, default=True)
|
||||||
|
|
||||||
|
# do not load this column
|
||||||
|
comment = deferred(sa.Column(sa.Text, nullable=True))
|
||||||
|
|
||||||
country = orm.relationship(PhoneCountry)
|
country = orm.relationship(PhoneCountry)
|
||||||
|
|
||||||
|
|
||||||
|
|
29
migrations/versions/2022_010414_753d2ed92d41_.py
Normal file
29
migrations/versions/2022_010414_753d2ed92d41_.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: 753d2ed92d41
|
||||||
|
Revises: 3d05479d0d11
|
||||||
|
Create Date: 2022-01-04 14:54:37.818658
|
||||||
|
|
||||||
|
"""
|
||||||
|
import sqlalchemy_utils
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '753d2ed92d41'
|
||||||
|
down_revision = '3d05479d0d11'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.add_column('phone_number', sa.Column('comment', sa.Text(), nullable=True))
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_column('phone_number', 'comment')
|
||||||
|
# ### end Alembic commands ###
|
Loading…
Reference in a new issue