Add phone ext column to invites and phone ext field to new member form
This commit is contained in:
parent
5419e1c475
commit
c7d8bc260c
30
alembic/versions/0ee5a34a1b84_add_extension_to_invites.py
Normal file
30
alembic/versions/0ee5a34a1b84_add_extension_to_invites.py
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
"""add extension to invites
|
||||||
|
|
||||||
|
Revision ID: 0ee5a34a1b84
|
||||||
|
Revises: 4a3122ffe898
|
||||||
|
Create Date: 2019-09-09 16:16:32.018776
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '0ee5a34a1b84' # pragma: allowlist secret
|
||||||
|
down_revision = '4a3122ffe898' # pragma: allowlist secret
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.add_column('application_invitations', sa.Column('phone_ext', sa.String(), nullable=True))
|
||||||
|
op.add_column('portfolio_invitations', sa.Column('phone_ext', sa.String(), nullable=True))
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_column('portfolio_invitations', 'phone_ext')
|
||||||
|
op.drop_column('application_invitations', 'phone_ext')
|
||||||
|
# ### end Alembic commands ###
|
@ -21,6 +21,7 @@ class NewForm(FlaskForm):
|
|||||||
translate("forms.new_member.phone_number_label"),
|
translate("forms.new_member.phone_number_label"),
|
||||||
validators=[Optional(), PhoneNumber()],
|
validators=[Optional(), PhoneNumber()],
|
||||||
)
|
)
|
||||||
|
phone_ext = StringField("Extension")
|
||||||
dod_id = StringField(
|
dod_id = StringField(
|
||||||
translate("forms.new_member.dod_id_label"),
|
translate("forms.new_member.dod_id_label"),
|
||||||
validators=[Required(), Length(min=10), IsNumber()],
|
validators=[Required(), Length(min=10), IsNumber()],
|
||||||
|
@ -49,6 +49,7 @@ class InvitesMixin(object):
|
|||||||
first_name = Column(String)
|
first_name = Column(String)
|
||||||
last_name = Column(String)
|
last_name = Column(String)
|
||||||
phone_number = Column(String)
|
phone_number = Column(String)
|
||||||
|
phone_ext = Column(String)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
role_id = self.role.id if self.role else None
|
role_id = self.role.id if self.role else None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user