Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Introducing Instagram URL in speaker model #6737

Merged
merged 2 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions app/api/schema/speakers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class Meta:
facebook = fields.Url(allow_none=True)
github = fields.Url(allow_none=True)
linkedin = fields.Url(allow_none=True)
instagram = fields.Url(allow_none=True)
organisation = fields.Str(allow_none=True)
is_featured = fields.Boolean(default=False)
is_email_overridden = fields.Boolean(default=False)
Expand Down
3 changes: 3 additions & 0 deletions app/models/speaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Speaker(SoftDeletionModel):
facebook = db.Column(db.String)
github = db.Column(db.String)
linkedin = db.Column(db.String)
instagram = db.Column(db.String)
organisation = db.Column(db.String)
is_featured = db.Column(db.Boolean, default=False)
is_email_overridden = db.Column(db.Boolean, default=False)
Expand Down Expand Up @@ -51,6 +52,7 @@ def __init__(self,
facebook=None,
github=None,
linkedin=None,
instagram=None,
organisation=None,
is_featured=False,
is_email_overridden=False,
Expand Down Expand Up @@ -79,6 +81,7 @@ def __init__(self,
self.facebook = facebook
self.github = github
self.linkedin = linkedin
self.instagram = instagram
self.is_featured = is_featured
self.is_email_overridden = is_email_overridden
self.organisation = organisation
Expand Down
28 changes: 28 additions & 0 deletions migrations/versions/rev-2020-01-13-22:43:30-eef7c9bc83a0_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""empty message

Revision ID: eef7c9bc83a0
Revises: dee1ad7bee53
Create Date: 2020-01-13 22:43:30.603812

"""

from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils


# revision identifiers, used by Alembic.
revision = 'eef7c9bc83a0'
down_revision = 'dee1ad7bee53'


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('speaker', sa.Column('instagram', sa.String(), nullable=True))
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('speaker', 'instagram')
# ### end Alembic commands ###