Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

fake-data, teams and subscriptions #3582

Merged
merged 1 commit into from
Jun 24, 2015
Merged

Conversation

rorepo
Copy link
Contributor

@rorepo rorepo commented Jun 24, 2015

Fake data script updated to create teams and subscriptions.

Fake data test script updated accordingly.

@rohitpaulk rohitpaulk mentioned this pull request Jun 24, 2015
chadwhitacre added a commit that referenced this pull request Jun 24, 2015
fake-data, teams and subscriptions
@chadwhitacre chadwhitacre merged commit f82f7e4 into gratipay:master Jun 24, 2015
@chadwhitacre
Copy link
Contributor

Thanks for the contribution, @rorepo! 💃

@rorepo
Copy link
Contributor Author

rorepo commented Jun 25, 2015

Following on from the comment in the earlier #3573:

Leaving fake tips around until the migration has been verified seems to make sense. However, how is the migration intended to happen? Is it that new users will only be using subscriptions, while existing users will have their tips records migrated to subscriptions? Presumably, starting with a small batch of existing users?

On removal of tips from fake_data, this is the situation as I see it:
Methods:
fake_tip_amount - this is a generic function to give a dummy amount, the only relation to tips being the MIN_TIP and MAX_TIP values. I've used this function in fake_subscription, so this function itself can't be removed unless a new version is created for fake-subscription.

fake_tip - can be removed, subject to the 'Making tips' bit being removed from populate_db

populate_db - in this:
The 'Making tips' bit can be removed, subject to the usage of the tips collection being removed/replaced in the rest of the code
A small complication I see in doing this is that I'm unclear about the equivalence of tipper, tippee in tips to subscriber, team in subscriptions. If I have understood correct, both tipper and tippee were referring to participant instances, while in subscriptions, the team is obviously referring to a team. And the complication actually arises from the fact that tips.tippee refers to the participant username, while subscriptions.team refers to team.slug - so this will need to be worked around.

Additionally, there is the aspect of transfers - are these still from participant to participant?

Also, a question about methods like fake_tip_amount, (community) slugize - seems likely these (or versions of these) could be used by different modules. Is there a common module such methods could be added to?

@chadwhitacre
Copy link
Contributor

However, how is the migration intended to happen?

Migration happens with a one-off script every week during payday, e.g., #3566 (comment).

@chadwhitacre
Copy link
Contributor

Additionally, there is the aspect of transfers - are these still from participant to participant?

Yes, and, as with tips, these are historical. We replaced the tips and transfers tables with the subscriptions and payments tables in #3414.

@chadwhitacre
Copy link
Contributor

Also, a question about methods like fake_tip_amount, (community) slugize - seems likely these (or versions of these) could be used by different modules. Is there a common module such methods could be added to?

Maybe in gratipay.utils?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants