These are chat archives for fossasia/open-event-server

Jun 2018
Jun 09 2018 07:34 UTC
can someone explain how do the migration files work
Saurav Tiwary
Jun 09 2018 07:43 UTC
With my limited knowledge I will try and explain:
Every migration file has a version number and a downgrade version number. Moreover you have two methods upgrade and downgrade. Now the upgrade method will run when you run the command python db upgrade and then python db migrate. Now your HEAD is at the version number. Now let's say you want to revert the changes that you have made in this migration. You can run python db downgrade and it will revert the changes that you've made in this migration. Now your HEAD will point to the downgrade version number.
These version numbers are just something used by Alembic to keep track of versions. If you understand how GIT version control works then it's extremely similar to this.
Hopefully whatever I have explained is right and makes sense :smile:
Saurabh Chaturvedi
Jun 09 2018 07:44 UTC
:+1: But isn't python db migrate used after updating database model files and then the upgrade is done?
Saurav Tiwary
Jun 09 2018 07:45 UTC
Umm, yeah. :+1:
I wasn't sure when the upgrade method runs :smile:
so I stated both :laughing:
Saurabh Chaturvedi
Jun 09 2018 07:46 UTC
:+1: :smiley:
Saurav Tiwary
Jun 09 2018 09:34 UTC

@bhaveshAn Please review and merge: fossasia/open-event-server#4845 and fossasia/open-event-server#4867
They already have enough number of reviews and only make 2-3 line changes. We should try to increase the speed at which these small scale PRs are reviewed and merged.

@mariobehling As discussed earlier in the chat, can I also get the merging rights ? It would mean I won't have to ask others to merge PRs and hence making the issue - PR iteration faster.

Bhavesh Anand
Jun 09 2018 10:10 UTC
@srv-twry Thanks :+1: