Skip to content

Conversation

@prateekj117
Copy link
Member

Fixes #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.

mrsaicharan1
mrsaicharan1 previously approved these changes Jun 7, 2019
@codecov
Copy link

codecov bot commented Jun 7, 2019

Codecov Report

Merging #6009 into development will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #6009      +/-   ##
===============================================
- Coverage        66.16%   66.15%   -0.01%     
===============================================
  Files              285      285              
  Lines            14047    14044       -3     
===============================================
- Hits              9294     9291       -3     
  Misses            4753     4753
Impacted Files Coverage Δ
app/api/schema/events.py 89.93% <100%> (-0.07%) ⬇️
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 fd99ecf...f9bf833. Read the comment docs.

kushthedude
kushthedude previously approved these changes Jun 10, 2019
iamareebjamal
iamareebjamal previously approved these changes Jun 10, 2019
@iamareebjamal iamareebjamal changed the title Revert PR for adding required fields of ngo events fix: Revert PR for adding required fields of ngo events Jun 10, 2019
@auto-label auto-label bot added the fix label Jun 10, 2019

# revision identifiers, used by Alembic.
revision = '31a6cf1c9374'
down_revision = '89a5b836b406'
Copy link
Member

Choose a reason for hiding this comment

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

Please update the migration file with the latest revision

@prateekj117
Copy link
Member Author

@iamareebjamal Please review.

@iamareebjamal
Copy link
Member

#6009 (comment)

@prateekj117
Copy link
Member Author

prateekj117 commented Jun 14, 2019

@iamareebjamal Instead of that, I pulled the latest changes of development into this branch and merged the migrations heads and checked locally, everything works fine.

@iamareebjamal
Copy link
Member

Please keep a single migration

@prateekj117
Copy link
Member Author

existing_type=sa.BOOLEAN(),
nullable=True,
autoincrement=False,
existing_server_default=sa.text('false'))
Copy link
Member

Choose a reason for hiding this comment

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

This should not be here

Copy link
Member Author

Choose a reason for hiding this comment

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

@iamareebjamal This is a auto-generated migration.

Copy link
Member

Choose a reason for hiding this comment

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

Still

def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('events', 'is_ngo')
op.alter_column('events_version', 'show_remaining_tickets',
Copy link
Member

Choose a reason for hiding this comment

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

This seems to be occurring due to some issue with migration commands. Please remove this as we are not making any changes to the remaining tickets column in events_version

Copy link
Contributor

Choose a reason for hiding this comment

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

@mrsaicharan1 is correct. This automatic script just saw that your events have a null show remaining tickets column.
That's why this line is being generated. so removing it should be fine.

def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('events_version', sa.Column('is_ngo', sa.BOOLEAN(), autoincrement=False, nullable=True))
op.alter_column('events_version', 'show_remaining_tickets',
Copy link
Member

Choose a reason for hiding this comment

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

Same here. Remove this and this is good to go.
Also, just a pointer, whenever migration files are generated, there is a line which tells you that
# ### commands auto generated by Alembic - please adjust! ###

Copy link
Contributor

Choose a reason for hiding this comment

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

@prateekj117 Same goes with this block

def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('events', 'is_ngo')
op.alter_column('events_version', 'show_remaining_tickets',
Copy link
Contributor

Choose a reason for hiding this comment

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

@mrsaicharan1 is correct. This automatic script just saw that your events have a null show remaining tickets column.
That's why this line is being generated. so removing it should be fine.

def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('events_version', sa.Column('is_ngo', sa.BOOLEAN(), autoincrement=False, nullable=True))
op.alter_column('events_version', 'show_remaining_tickets',
Copy link
Contributor

Choose a reason for hiding this comment

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

@prateekj117 Same goes with this block

@prateekj117
Copy link
Member Author

@mrsaicharan1 @uds5501 @iamareebjamal Made the changes. Please review.

@iamareebjamal iamareebjamal merged commit 0caf6a8 into fossasia:development Jun 16, 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.

Ability to add donation support

6 participants