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

feature: Implement billing_historicals table #1163

Merged
merged 8 commits into from
Aug 29, 2023

Conversation

jshearer
Copy link
Contributor

@jshearer jshearer commented Aug 25, 2023

Also adds internal.freeze_billing_month(billed_month timestamptz) to populate billing_historicals

Also update billing_report_202308() to allow callers with BYPASSRLS set to generate the billing report for any tenant. This is so that a call to freeze_billing_month() can generate billing data for every tenant, without the caller (postgres) having admin grants.


This change is Reviewable

…_month(billed_month timestamptz)`

Also update `billing_report_202308()` to allow callers with `BYPASSRLS` set to generate the billing report for any tenant.
supabase/migrations/21_billing_v2.sql Outdated Show resolved Hide resolved
supabase/pending/billing_historicals.sql Outdated Show resolved Hide resolved
supabase/migrations/24_billing_historicals.sql Outdated Show resolved Hide resolved
Copy link
Member

@jgraettinger jgraettinger left a comment

Choose a reason for hiding this comment

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

LGTM! % some final small nits

supabase/migrations/24_billing_historicals.sql Outdated Show resolved Hide resolved
supabase/migrations/24_billing_historicals.sql Outdated Show resolved Hide resolved
supabase/migrations/24_billing_historicals.sql Outdated Show resolved Hide resolved
supabase/migrations/24_billing_historicals.sql Outdated Show resolved Hide resolved
supabase/migrations/24_billing_historicals.sql Outdated Show resolved Hide resolved
@jshearer jshearer merged commit 70beb4d into master Aug 29, 2023
3 checks passed
@jgraettinger jgraettinger deleted the feature/billing_historicals branch August 30, 2023 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants