Skip to content

Commit

Permalink
fix: fix dependent table id column type in the model (#16660)
Browse files Browse the repository at this point in the history
  • Loading branch information
yezizp2012 authored May 9, 2024
1 parent cb8a92a commit c9a2083
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/meta/model_v2/src/subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct Model {
pub retention_seconds: i64,
pub definition: String,
pub subscription_state: i32,
pub dependent_table_id: u32,
pub dependent_table_id: i32,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
Expand Down Expand Up @@ -59,7 +59,7 @@ impl From<PbSubscription> for ActiveModel {
retention_seconds: Set(pb_subscription.retention_seconds as _),
definition: Set(pb_subscription.definition),
subscription_state: Set(pb_subscription.subscription_state),
dependent_table_id: Set(pb_subscription.dependent_table_id),
dependent_table_id: Set(pb_subscription.dependent_table_id as _),
}
}
}
2 changes: 1 addition & 1 deletion src/meta/src/controller/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ impl From<ObjectModel<subscription::Model>> for PbSubscription {
),
initialized_at_cluster_version: value.1.initialized_at_cluster_version,
created_at_cluster_version: value.1.created_at_cluster_version,
dependent_table_id: value.0.dependent_table_id,
dependent_table_id: value.0.dependent_table_id as _,
subscription_state: PbSubscriptionState::Init as _,
}
}
Expand Down

0 comments on commit c9a2083

Please sign in to comment.