From 61285d0a53747f95de0089ea110834659f269340 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 9 May 2024 11:36:40 +0000 Subject: [PATCH] fix: fix dependent table id column type in the model (#16660) (#16666) Co-authored-by: August --- src/meta/model_v2/src/subscription.rs | 4 ++-- src/meta/src/controller/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/meta/model_v2/src/subscription.rs b/src/meta/model_v2/src/subscription.rs index 47ebbc63a2dc1..3d53c4b767804 100644 --- a/src/meta/model_v2/src/subscription.rs +++ b/src/meta/model_v2/src/subscription.rs @@ -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)] @@ -59,7 +59,7 @@ impl From 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 _), } } } diff --git a/src/meta/src/controller/mod.rs b/src/meta/src/controller/mod.rs index ff90dd33297d2..7e9f20f7557d6 100644 --- a/src/meta/src/controller/mod.rs +++ b/src/meta/src/controller/mod.rs @@ -235,7 +235,7 @@ impl From> 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 _, } }