Skip to content

Commit

Permalink
fix breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Nov 1, 2024
1 parent dde12ee commit 6671d71
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 34 deletions.
6 changes: 1 addition & 5 deletions src/meta/model/migration/src/m20230908_072257_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,7 @@ impl MigrationTrait for Migration {
.string()
.not_null(),
)
.col(
ColumnDef::new(Fragment::StreamNode)
.blob(BlobSize::Long)
.not_null(),
)
.col(ColumnDef::new(Fragment::StreamNode).blob().not_null())
.col(ColumnDef::new(Fragment::VnodeMapping).binary().not_null())
.col(ColumnDef::new(Fragment::StateTableIds).json_binary())
.col(ColumnDef::new(Fragment::UpstreamFragmentId).json_binary())
Expand Down
12 changes: 4 additions & 8 deletions src/meta/model/migration/src/m20231008_020431_hummock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ impl MigrationTrait for Migration {
.not_null()
.primary_key(),
)
.col(
ColumnDef::new(CompactionTask::Task)
.blob(BlobSize::Long)
.not_null(),
)
.col(ColumnDef::new(CompactionTask::Task).blob().not_null())
.col(
ColumnDef::new(CompactionTask::ContextId)
.integer()
Expand All @@ -54,7 +50,7 @@ impl MigrationTrait for Migration {
.not_null()
.primary_key(),
)
.col(ColumnDef::new(CompactionConfig::Config).blob(BlobSize::Long))
.col(ColumnDef::new(CompactionConfig::Config).blob())
.to_owned(),
)
.await?;
Expand All @@ -69,7 +65,7 @@ impl MigrationTrait for Migration {
.not_null()
.primary_key(),
)
.col(ColumnDef::new(CompactionStatus::Status).blob(BlobSize::Long))
.col(ColumnDef::new(CompactionStatus::Status).blob())
.to_owned(),
)
.await?;
Expand Down Expand Up @@ -142,7 +138,7 @@ impl MigrationTrait for Migration {
.boolean()
.not_null(),
)
.col(ColumnDef::new(HummockVersionDelta::FullVersionDelta).blob(BlobSize::Long))
.col(ColumnDef::new(HummockVersionDelta::FullVersionDelta).blob())
.to_owned(),
)
.await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ impl MigrationTrait for Migration {
.alter_table(
Table::alter()
.table(Function::Table)
.modify_column(
ColumnDef::new(Function::CompressedBinary).blob(BlobSize::Medium),
)
.modify_column(ColumnDef::new(Function::CompressedBinary).blob())
.to_owned(),
)
.await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl MigrationTrait for Migration {
)
.col(
ColumnDef::new(HummockSstableInfo::SstableInfo)
.blob(BlobSize::Long)
.blob()
.null(),
)
.to_owned(),
Expand All @@ -46,7 +46,7 @@ impl MigrationTrait for Migration {
)
.col(
ColumnDef::new(HummockTimeTravelVersion::Version)
.blob(BlobSize::Long)
.blob()
.null(),
)
.to_owned(),
Expand All @@ -66,7 +66,7 @@ impl MigrationTrait for Migration {
)
.col(
ColumnDef::new(HummockTimeTravelDelta::VersionDelta)
.blob(BlobSize::Long)
.blob()
.null(),
)
.to_owned(),
Expand Down
2 changes: 1 addition & 1 deletion src/meta/model/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{
};

#[derive(Clone, Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum ActorStatus {
#[sea_orm(string_value = "INACTIVE")]
Inactive,
Expand Down
2 changes: 1 addition & 1 deletion src/meta/model/src/actor_dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::{ActorId, ActorMapping, FragmentId, I32Array};
#[derive(
Hash, Copy, Clone, Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize,
)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum DispatcherType {
#[sea_orm(string_value = "HASH")]
Hash,
Expand Down
2 changes: 1 addition & 1 deletion src/meta/model/src/catalog_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Copy, Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum VersionCategory {
#[sea_orm(string_value = "NOTIFICATION")]
Notification,
Expand Down
2 changes: 1 addition & 1 deletion src/meta/model/src/fragment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct Model {
}

#[derive(Copy, Clone, Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum DistributionType {
#[sea_orm(string_value = "SINGLE")]
Single,
Expand Down
2 changes: 1 addition & 1 deletion src/meta/model/src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use serde::{Deserialize, Serialize};
use crate::{DataType, DataTypeArray, FunctionId};

#[derive(Clone, Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum FunctionKind {
#[sea_orm(string_value = "Scalar")]
Scalar,
Expand Down
4 changes: 2 additions & 2 deletions src/meta/model/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub type FragmentId = i32;
pub type ActorId = i32;

#[derive(Clone, Copy, Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum JobStatus {
#[sea_orm(string_value = "INITIAL")]
Initial,
Expand Down Expand Up @@ -125,7 +125,7 @@ impl From<JobStatus> for PbStreamJobState {
}

#[derive(Clone, Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum CreateType {
#[sea_orm(string_value = "BACKGROUND")]
Background,
Expand Down
2 changes: 1 addition & 1 deletion src/meta/model/src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use serde::{Deserialize, Serialize};
use crate::{DatabaseId, ObjectId, SchemaId, UserId};

#[derive(Clone, Debug, PartialEq, Eq, Copy, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum ObjectType {
#[sea_orm(string_value = "DATABASE")]
Database,
Expand Down
2 changes: 1 addition & 1 deletion src/meta/model/src/secret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub secret_id: i32,
pub name: String,
#[sea_orm(column_type = "Binary(BlobSize::Blob(None))")]
#[sea_orm(column_type = "Blob")]
pub value: Vec<u8>,
}

Expand Down
2 changes: 1 addition & 1 deletion src/meta/model/src/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::{
};

#[derive(Clone, Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum SinkType {
#[sea_orm(string_value = "APPEND_ONLY")]
AppendOnly,
Expand Down
4 changes: 2 additions & 2 deletions src/meta/model/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::{
#[derive(
Clone, Debug, PartialEq, Hash, Copy, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize,
)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum TableType {
#[sea_orm(string_value = "TABLE")]
Table,
Expand Down Expand Up @@ -65,7 +65,7 @@ impl From<PbTableType> for TableType {
}

#[derive(Clone, Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum HandleConflictBehavior {
#[sea_orm(string_value = "OVERWRITE")]
Overwrite,
Expand Down
2 changes: 1 addition & 1 deletion src/meta/model/src/user_privilege.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use serde::{Deserialize, Serialize};
use crate::{ObjectId, PrivilegeId, UserId};

#[derive(Clone, Debug, Hash, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum Action {
#[sea_orm(string_value = "INSERT")]
Insert,
Expand Down
4 changes: 2 additions & 2 deletions src/meta/model/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use serde::{Deserialize, Serialize};
use crate::{TransactionId, WorkerId};

#[derive(Clone, Debug, Hash, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum WorkerType {
#[sea_orm(string_value = "FRONTEND")]
Frontend,
Expand Down Expand Up @@ -61,7 +61,7 @@ impl From<WorkerType> for PbWorkerType {
}

#[derive(Clone, Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
#[sea_orm(rs_type = "String", db_type = "String(None)")]
#[sea_orm(rs_type = "String", db_type = "String(StringLen::None)")]
pub enum WorkerStatus {
#[sea_orm(string_value = "STARTING")]
Starting,
Expand Down

0 comments on commit 6671d71

Please sign in to comment.