collab: Add plan
column to subscription_usages
(#28889)
This PR adds a `plan` column to the `subscription_usages` table. These tables don't have any records in them yet, so it's fine to make the column required without a default. Release Notes: - N/A
This commit is contained in:
parent
7bdde8f14f
commit
10507f9a4c
2 changed files with 6 additions and 0 deletions
|
@ -0,0 +1,4 @@
|
|||
alter table subscription_usages
|
||||
add column plan text not null;
|
||||
|
||||
create index ix_subscription_usages_on_plan on subscription_usages (plan);
|
|
@ -1,4 +1,5 @@
|
|||
use crate::db::UserId;
|
||||
use crate::db::billing_subscription::SubscriptionKind;
|
||||
use sea_orm::entity::prelude::*;
|
||||
use time::PrimitiveDateTime;
|
||||
|
||||
|
@ -10,6 +11,7 @@ pub struct Model {
|
|||
pub user_id: UserId,
|
||||
pub period_start_at: PrimitiveDateTime,
|
||||
pub period_end_at: PrimitiveDateTime,
|
||||
pub plan: SubscriptionKind,
|
||||
pub model_requests: i32,
|
||||
pub edit_predictions: i32,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue