add PhoneNumber.comment column

This commit is contained in:
Son 2022-01-04 14:54:55 +01:00
parent 127f8daad7
commit bc2f9ad45f
2 changed files with 32 additions and 0 deletions

View File

@ -2729,6 +2729,9 @@ class PhoneNumber(Base, ModelMixin):
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)

View 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 ###