-
Notifications
You must be signed in to change notification settings - Fork 128
misc(organization): Not null constraint on applied_usage_thresholds #3879
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julienbourdeau
approved these changes
Jun 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those generators 🥰
groyoh
approved these changes
Jun 27, 2025
db/migrate/20250627084852_not_null_organization_id_on_applied_usage_thresholds.rb
Show resolved
Hide resolved
6125f66
to
681ac97
Compare
This was referenced Jun 27, 2025
vincent-pochet
added a commit
that referenced
this pull request
Jun 30, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on `billable_metric_filters` and `billing_entities_taxes` tables
vincent-pochet
added a commit
that referenced
this pull request
Jun 30, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `charges` - `charges_applied_taxes` - `charge_filters` - `charge_filter_values` - `commitments` - `commitment_applied_taxes` - `coupon_targets` - `credits` - `credit_notes` - `credit_notes_applied_taxes` - `customers_applied_taxes` - `customer_metadata`
vincent-pochet
added a commit
that referenced
this pull request
Jun 30, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `data_export_parts` - `data_exports` - `dunning_campaign_thresholds`
This was referenced Jul 7, 2025
vincent-pochet
added a commit
that referenced
this pull request
Jul 7, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `integration_items` - `integration_resources` - `invoice_subscriptions`
vincent-pochet
added a commit
that referenced
this pull request
Jul 7, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `payments` - `recurring_transaction_rules` - `refunds`
vincent-pochet
added a commit
that referenced
this pull request
Jul 7, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `wallets` - `wallet_transactions` - `webhooks`
This was referenced Jul 7, 2025
vincent-pochet
added a commit
that referenced
this pull request
Jul 7, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `add_ons_taxes` - `fees_taxes` - `invoices_taxes` - `plans_taxes`
vincent-pochet
added a commit
that referenced
this pull request
Jul 7, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `integration_collection_mappings` - `integration_customers` - `integration_mappings`
This was referenced Jul 7, 2025
vincent-pochet
added a commit
that referenced
this pull request
Jul 7, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `invoice_metadata` - `invoices_payment_requests` - `usage_threshold`
vincent-pochet
added a commit
that referenced
this pull request
Jul 7, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `adjusted_fees` - `applied_coupons` - `payment_provider_customers` - `applied_invoice_custom_sections`
diegocharles
pushed a commit
that referenced
this pull request
Jul 11, 2025
…3879) ## Context Now that we are done with #3687 to add a presence validation on the organization_id field), let's add a proper NOT NULL constraint at the DB level! ## Description This PR adds: - The not null constraint on `theapplied_usage_thresholds` table - Add new `not_null_organization_id` rails generator to make it easier to create the migration files A lot of new migrations are coming :)
diegocharles
pushed a commit
that referenced
this pull request
Jul 11, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on `billable_metric_filters` and `billing_entities_taxes` tables
diegocharles
pushed a commit
that referenced
this pull request
Jul 11, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `charges` - `charges_applied_taxes` - `charge_filters` - `charge_filter_values` - `commitments` - `commitment_applied_taxes` - `coupon_targets` - `credits` - `credit_notes` - `credit_notes_applied_taxes` - `customers_applied_taxes` - `customer_metadata`
diegocharles
pushed a commit
that referenced
this pull request
Jul 11, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `data_export_parts` - `data_exports` - `dunning_campaign_thresholds`
diegocharles
pushed a commit
that referenced
this pull request
Jul 11, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `integration_items` - `integration_resources` - `invoice_subscriptions`
diegocharles
pushed a commit
that referenced
this pull request
Jul 11, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `payments` - `recurring_transaction_rules` - `refunds`
diegocharles
pushed a commit
that referenced
this pull request
Jul 11, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `wallets` - `wallet_transactions` - `webhooks`
diegocharles
pushed a commit
that referenced
this pull request
Jul 11, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `add_ons_taxes` - `fees_taxes` - `invoices_taxes` - `plans_taxes`
diegocharles
pushed a commit
that referenced
this pull request
Jul 11, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `integration_collection_mappings` - `integration_customers` - `integration_mappings`
diegocharles
pushed a commit
that referenced
this pull request
Jul 11, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `invoice_metadata` - `invoices_payment_requests` - `usage_threshold`
diegocharles
pushed a commit
that referenced
this pull request
Jul 11, 2025
## Context Let's continue with not null constraint on organization_id column after #3879 ## Description This PR adds the not null constraint on new tables: - `adjusted_fees` - `applied_coupons` - `payment_provider_customers` - `applied_invoice_custom_sections`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Now that we are done with #3687 to add a presence validation on the organization_id field), let's add a proper NOT NULL constraint at the DB level!
Description
This PR adds:
theapplied_usage_thresholds
tablenot_null_organization_id
rails generator to make it easier to create the migration filesA lot of new migrations are coming :)