Skip to content

Conversation

@mrsaicharan1
Copy link
Member

Part of #5991

Checklist

  • I have read the Contribution & Best practices Guide and my PR follows them.
  • My branch is up-to-date with the Upstream development branch.
  • The unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All the functions created/modified in this PR contain relevant docstrings.

Short description of what this resolves:

  • Adds fields in schemas and models for NGO events
  • Added migration

Changes proposed in this pull request:

  • Added migration
  • Modified fields


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('events', sa.Column('is_ngo', sa.Boolean(), nullable=True))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nullable=False

Copy link
Member Author

@mrsaicharan1 mrsaicharan1 Jun 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RC

Updated 👍

Copy link
Member

@iamareebjamal iamareebjamal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RC

@iamareebjamal
Copy link
Member

The migration will fail

@mrsaicharan1
Copy link
Member Author

The migration will fail

Is it essential to mention nullable=False in SQLAlchemy model as well?

@iamareebjamal
Copy link
Member

Yes, but not related to migration. The migration will fail because default value is not supplied in the migration

@codecov
Copy link

codecov bot commented Jun 4, 2019

Codecov Report

Merging #5995 into development will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #5995      +/-   ##
===============================================
+ Coverage        66.28%   66.28%   +<.01%     
===============================================
  Files              285      285              
  Lines            13992    13995       +3     
===============================================
+ Hits              9274     9277       +3     
  Misses            4718     4718
Impacted Files Coverage Δ
app/api/schema/events.py 89.93% <100%> (+0.06%) ⬆️
app/models/event.py 81.92% <100%> (+0.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update caff08d...933a76d. Read the comment docs.

@iamareebjamal iamareebjamal merged commit c03297b into fossasia:development Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants