Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sync subscription and split subscriptionItems into separate table #38

Merged
merged 17 commits into from
Jan 20, 2022

Conversation

phamhieu
Copy link
Member

@phamhieu phamhieu commented Jan 17, 2022

What kind of change does this PR introduce?

  • extract webhook subscription event to upsert subscription_items into its own table
  • migration script to move all of the existing subscription.items into subscription_items table
  • update the /sync endpoint to sync subscriptions

Additional context

related issues: #19 #37

@phamhieu phamhieu changed the title [WIP] feat: split sub items to separate table feat: sync subscription and split subscriptionItems into separate table Jan 18, 2022
src/routes/webhooks.ts Outdated Show resolved Hide resolved
src/utils/migrate.ts Outdated Show resolved Hide resolved
db/migrations/0013_add_subscription_items.sql Show resolved Hide resolved
src/lib/sync.ts Show resolved Hide resolved
@kiwicopple
Copy link
Member

I'm guessing the subscription test also touches this new code right?

@phamhieu
Copy link
Member Author

I'm guessing the subscription test also touches this new code right?

yes, should be. upsertSubscription method name is kept as original

@phamhieu phamhieu merged commit bf3c837 into main Jan 20, 2022
@github-actions
Copy link

🎉 This PR is included in version 0.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants