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

9th
Jun 2018
Kreijstal
@Kreijstal
Jun 09 2018 07:34 UTC
can someone explain how do the migration files work
Saurav Tiwary
@srv-twry
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 manage.py db upgrade and then python manage.py 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 manage.py 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
@schedutron
Jun 09 2018 07:44 UTC
:+1: But isn't python manage.py db migrate used after updating database model files and then the upgrade is done?
Saurav Tiwary
@srv-twry
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
@schedutron
Jun 09 2018 07:46 UTC
:+1: :smiley:
Saurav Tiwary
@srv-twry
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
@bhaveshAn
Jun 09 2018 10:10 UTC
@srv-twry Thanks :+1: