diff --git a/src/meta/model/migration/src/m20230908_072257_init.rs b/src/meta/model/migration/src/m20230908_072257_init.rs index 7840c40cd8f30..d46b3ca622907 100644 --- a/src/meta/model/migration/src/m20230908_072257_init.rs +++ b/src/meta/model/migration/src/m20230908_072257_init.rs @@ -140,7 +140,7 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(User::CanCreateDb).boolean().not_null()) .col(ColumnDef::new(User::CanCreateUser).boolean().not_null()) .col(ColumnDef::new(User::CanLogin).boolean().not_null()) - .col(ColumnDef::new(User::AuthInfo).binary()) + .col(ColumnDef::new(User::AuthInfo).blob()) .to_owned(), ) .await?; @@ -376,12 +376,8 @@ impl MigrationTrait for Migration { .string() .not_null(), ) - .col( - ColumnDef::new(Fragment::StreamNode) - .blob(BlobSize::Long) - .not_null(), - ) - .col(ColumnDef::new(Fragment::VnodeMapping).binary().not_null()) + .col(ColumnDef::new(Fragment::StreamNode).blob().not_null()) + .col(ColumnDef::new(Fragment::VnodeMapping).blob().not_null()) .col(ColumnDef::new(Fragment::StateTableIds).json_binary()) .col(ColumnDef::new(Fragment::UpstreamFragmentId).json_binary()) .foreign_key( @@ -407,12 +403,12 @@ impl MigrationTrait for Migration { ) .col(ColumnDef::new(Actor::FragmentId).integer().not_null()) .col(ColumnDef::new(Actor::Status).string().not_null()) - .col(ColumnDef::new(Actor::Splits).binary()) + .col(ColumnDef::new(Actor::Splits).blob()) .col(ColumnDef::new(Actor::ParallelUnitId).integer().not_null()) .col(ColumnDef::new(Actor::WorkerId).integer().not_null()) .col(ColumnDef::new(Actor::UpstreamActorIds).json_binary()) - .col(ColumnDef::new(Actor::VnodeBitmap).binary()) - .col(ColumnDef::new(Actor::ExprContext).binary().not_null()) + .col(ColumnDef::new(Actor::VnodeBitmap).blob()) + .col(ColumnDef::new(Actor::ExprContext).blob().not_null()) .foreign_key( &mut ForeignKey::create() .name("FK_actor_fragment_id") @@ -454,7 +450,7 @@ impl MigrationTrait for Migration { .json_binary() .not_null(), ) - .col(ColumnDef::new(ActorDispatcher::HashMapping).binary()) + .col(ColumnDef::new(ActorDispatcher::HashMapping).blob()) .col( ColumnDef::new(ActorDispatcher::DispatcherId) .integer() @@ -495,7 +491,7 @@ impl MigrationTrait for Migration { .primary_key(), ) .col(ColumnDef::new(Connection::Name).string().not_null()) - .col(ColumnDef::new(Connection::Info).binary().not_null()) + .col(ColumnDef::new(Connection::Info).blob().not_null()) .foreign_key( &mut ForeignKey::create() .name("FK_connection_object_id") @@ -514,7 +510,7 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Source::SourceId).integer().primary_key()) .col(ColumnDef::new(Source::Name).string().not_null()) .col(ColumnDef::new(Source::RowIdIndex).integer()) - .col(ColumnDef::new(Source::Columns).binary().not_null()) + .col(ColumnDef::new(Source::Columns).blob().not_null()) .col(ColumnDef::new(Source::PkColumnIds).json_binary().not_null()) .col( ColumnDef::new(Source::WithProperties) @@ -522,8 +518,8 @@ impl MigrationTrait for Migration { .not_null(), ) .col(ColumnDef::new(Source::Definition).text().not_null()) - .col(ColumnDef::new(Source::SourceInfo).binary()) - .col(ColumnDef::new(Source::WatermarkDescs).binary().not_null()) + .col(ColumnDef::new(Source::SourceInfo).blob()) + .col(ColumnDef::new(Source::WatermarkDescs).blob().not_null()) .col(ColumnDef::new(Source::OptionalAssociatedTableId).integer()) .col(ColumnDef::new(Source::ConnectionId).integer()) .col(ColumnDef::new(Source::Version).big_integer().not_null()) @@ -562,8 +558,8 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Table::OptionalAssociatedSourceId).integer()) .col(ColumnDef::new(Table::TableType).string().not_null()) .col(ColumnDef::new(Table::BelongsToJobId).integer()) - .col(ColumnDef::new(Table::Columns).binary().not_null()) - .col(ColumnDef::new(Table::Pk).binary().not_null()) + .col(ColumnDef::new(Table::Columns).blob().not_null()) + .col(ColumnDef::new(Table::Pk).blob().not_null()) .col( ColumnDef::new(Table::DistributionKey) .json_binary() @@ -593,14 +589,14 @@ impl MigrationTrait for Migration { ) .col(ColumnDef::new(Table::DistKeyInPk).json_binary().not_null()) .col(ColumnDef::new(Table::DmlFragmentId).integer()) - .col(ColumnDef::new(Table::Cardinality).binary()) + .col(ColumnDef::new(Table::Cardinality).blob()) .col( ColumnDef::new(Table::CleanedByWatermark) .boolean() .not_null(), ) .col(ColumnDef::new(Table::Description).string()) - .col(ColumnDef::new(Table::Version).binary()) + .col(ColumnDef::new(Table::Version).blob()) .col(ColumnDef::new(Table::RetentionSeconds).integer()) .col( ColumnDef::new(Table::IncomingSinks) @@ -655,8 +651,8 @@ impl MigrationTrait for Migration { .table(Sink::Table) .col(ColumnDef::new(Sink::SinkId).integer().primary_key()) .col(ColumnDef::new(Sink::Name).string().not_null()) - .col(ColumnDef::new(Sink::Columns).binary().not_null()) - .col(ColumnDef::new(Sink::PlanPk).binary().not_null()) + .col(ColumnDef::new(Sink::Columns).blob().not_null()) + .col(ColumnDef::new(Sink::PlanPk).blob().not_null()) .col( ColumnDef::new(Sink::DistributionKey) .json_binary() @@ -669,7 +665,7 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Sink::ConnectionId).integer()) .col(ColumnDef::new(Sink::DbName).string().not_null()) .col(ColumnDef::new(Sink::SinkFromName).string().not_null()) - .col(ColumnDef::new(Sink::SinkFormatDesc).binary()) + .col(ColumnDef::new(Sink::SinkFormatDesc).blob()) .col(ColumnDef::new(Sink::TargetTable).integer()) .foreign_key( &mut ForeignKey::create() @@ -704,7 +700,7 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(View::Name).string().not_null()) .col(ColumnDef::new(View::Properties).json_binary().not_null()) .col(ColumnDef::new(View::Definition).text().not_null()) - .col(ColumnDef::new(View::Columns).binary().not_null()) + .col(ColumnDef::new(View::Columns).blob().not_null()) .foreign_key( &mut ForeignKey::create() .name("FK_view_object_id") @@ -724,7 +720,7 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Index::Name).string().not_null()) .col(ColumnDef::new(Index::IndexTableId).integer().not_null()) .col(ColumnDef::new(Index::PrimaryTableId).integer().not_null()) - .col(ColumnDef::new(Index::IndexItems).binary().not_null()) + .col(ColumnDef::new(Index::IndexItems).blob().not_null()) .col(ColumnDef::new(Index::IndexColumnsLen).integer().not_null()) .foreign_key( &mut ForeignKey::create() @@ -760,8 +756,8 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Function::FunctionId).integer().primary_key()) .col(ColumnDef::new(Function::Name).string().not_null()) .col(ColumnDef::new(Function::ArgNames).string().not_null()) - .col(ColumnDef::new(Function::ArgTypes).binary().not_null()) - .col(ColumnDef::new(Function::ReturnType).binary().not_null()) + .col(ColumnDef::new(Function::ArgTypes).blob().not_null()) + .col(ColumnDef::new(Function::ReturnType).blob().not_null()) .col(ColumnDef::new(Function::Language).string().not_null()) .col(ColumnDef::new(Function::Link).string()) .col(ColumnDef::new(Function::Identifier).string()) diff --git a/src/meta/model/migration/src/m20231008_020431_hummock.rs b/src/meta/model/migration/src/m20231008_020431_hummock.rs index 42fe0c424f99c..abcc44195c5b9 100644 --- a/src/meta/model/migration/src/m20231008_020431_hummock.rs +++ b/src/meta/model/migration/src/m20231008_020431_hummock.rs @@ -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() @@ -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?; @@ -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?; @@ -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?; diff --git a/src/meta/model/migration/src/m20240304_074901_subscription.rs b/src/meta/model/migration/src/m20240304_074901_subscription.rs index 244c6abe11604..555d590933596 100644 --- a/src/meta/model/migration/src/m20240304_074901_subscription.rs +++ b/src/meta/model/migration/src/m20240304_074901_subscription.rs @@ -19,8 +19,8 @@ impl MigrationTrait for Migration { .primary_key(), ) .col(ColumnDef::new(Subscription::Name).string().not_null()) - .col(ColumnDef::new(Subscription::Columns).binary().not_null()) - .col(ColumnDef::new(Subscription::PlanPk).binary().not_null()) + .col(ColumnDef::new(Subscription::Columns).blob().not_null()) + .col(ColumnDef::new(Subscription::PlanPk).blob().not_null()) .col( ColumnDef::new(Subscription::DistributionKey) .json_binary() diff --git a/src/meta/model/migration/src/m20240506_112555_subscription_partial_ckpt.rs b/src/meta/model/migration/src/m20240506_112555_subscription_partial_ckpt.rs index 715be0e7cd23f..52c696ddb2e03 100644 --- a/src/meta/model/migration/src/m20240506_112555_subscription_partial_ckpt.rs +++ b/src/meta/model/migration/src/m20240506_112555_subscription_partial_ckpt.rs @@ -67,8 +67,8 @@ impl MigrationTrait for Migration { ) .col(ColumnDef::new(Subscription::Name).string().not_null()) .col(ColumnDef::new(Subscription::Definition).string().not_null()) - .col(ColumnDef::new(Subscription::Columns).binary().not_null()) - .col(ColumnDef::new(Subscription::PlanPk).binary().not_null()) + .col(ColumnDef::new(Subscription::Columns).blob().not_null()) + .col(ColumnDef::new(Subscription::PlanPk).blob().not_null()) .col( ColumnDef::new(Subscription::DistributionKey) .json_binary() diff --git a/src/meta/model/migration/src/m20240525_090457_secret.rs b/src/meta/model/migration/src/m20240525_090457_secret.rs index ed23085c66574..f9872da1d675f 100644 --- a/src/meta/model/migration/src/m20240525_090457_secret.rs +++ b/src/meta/model/migration/src/m20240525_090457_secret.rs @@ -21,7 +21,7 @@ impl MigrationTrait for Migration { .primary_key(), ) .col(ColumnDef::new(Secret::Name).string().not_null()) - .col(ColumnDef::new(Secret::Value).binary().not_null()) + .col(ColumnDef::new(Secret::Value).blob().not_null()) .foreign_key( &mut ForeignKey::create() .name("FK_secret_object_id") @@ -42,7 +42,7 @@ impl MigrationTrait for Migration { .alter_table( MigrationTable::alter() .table(Sink::Table) - .add_column(ColumnDef::new(Sink::SecretRef).binary()) + .add_column(ColumnDef::new(Sink::SecretRef).blob()) .to_owned(), ) .await?; @@ -52,7 +52,7 @@ impl MigrationTrait for Migration { .alter_table( MigrationTable::alter() .table(Source::Table) - .add_column(ColumnDef::new(Source::SecretRef).binary()) + .add_column(ColumnDef::new(Source::SecretRef).blob()) .to_owned(), ) .await?; diff --git a/src/meta/model/migration/src/m20240617_070131_index_column_properties.rs b/src/meta/model/migration/src/m20240617_070131_index_column_properties.rs index daff755da999f..a3fb9208ba9b0 100644 --- a/src/meta/model/migration/src/m20240617_070131_index_column_properties.rs +++ b/src/meta/model/migration/src/m20240617_070131_index_column_properties.rs @@ -10,7 +10,7 @@ impl MigrationTrait for Migration { .alter_table( Table::alter() .table(Index::Table) - .add_column(ColumnDef::new(Index::IndexColumnProperties).binary()) + .add_column(ColumnDef::new(Index::IndexColumnProperties).blob()) .to_owned(), ) .await diff --git a/src/meta/model/migration/src/m20240617_071625_sink_into_table_column.rs b/src/meta/model/migration/src/m20240617_071625_sink_into_table_column.rs index 4904dd3623245..9694cdd69b415 100644 --- a/src/meta/model/migration/src/m20240617_071625_sink_into_table_column.rs +++ b/src/meta/model/migration/src/m20240617_071625_sink_into_table_column.rs @@ -12,7 +12,7 @@ impl MigrationTrait for Migration { .alter_table( MigrationTable::alter() .table(Sink::Table) - .add_column(ColumnDef::new(Sink::OriginalTargetColumns).binary()) + .add_column(ColumnDef::new(Sink::OriginalTargetColumns).blob()) .to_owned(), ) .await?; diff --git a/src/meta/model/migration/src/m20240618_072634_function_compressed_binary.rs b/src/meta/model/migration/src/m20240618_072634_function_compressed_binary.rs index 6b4ef6157bcf6..9c9129c0217b9 100644 --- a/src/meta/model/migration/src/m20240618_072634_function_compressed_binary.rs +++ b/src/meta/model/migration/src/m20240618_072634_function_compressed_binary.rs @@ -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?; diff --git a/src/meta/model/migration/src/m20240630_131430_remove_parallel_unit.rs b/src/meta/model/migration/src/m20240630_131430_remove_parallel_unit.rs index 5acc8dc1a6165..7a8b319b34624 100644 --- a/src/meta/model/migration/src/m20240630_131430_remove_parallel_unit.rs +++ b/src/meta/model/migration/src/m20240630_131430_remove_parallel_unit.rs @@ -75,7 +75,7 @@ impl MigrationTrait for Migration { .alter_table( Table::alter() .table(Fragment::Table) - .add_column(ColumnDef::new(Fragment::VnodeMapping).binary().not_null()) + .add_column(ColumnDef::new(Fragment::VnodeMapping).blob().not_null()) .to_owned(), ) .await?; diff --git a/src/meta/model/migration/src/m20240701_060504_hummock_time_travel.rs b/src/meta/model/migration/src/m20240701_060504_hummock_time_travel.rs index 7dec44913dc8f..3f5c9b771d138 100644 --- a/src/meta/model/migration/src/m20240701_060504_hummock_time_travel.rs +++ b/src/meta/model/migration/src/m20240701_060504_hummock_time_travel.rs @@ -26,7 +26,7 @@ impl MigrationTrait for Migration { ) .col( ColumnDef::new(HummockSstableInfo::SstableInfo) - .blob(BlobSize::Long) + .blob() .null(), ) .to_owned(), @@ -46,7 +46,7 @@ impl MigrationTrait for Migration { ) .col( ColumnDef::new(HummockTimeTravelVersion::Version) - .blob(BlobSize::Long) + .blob() .null(), ) .to_owned(), @@ -66,7 +66,7 @@ impl MigrationTrait for Migration { ) .col( ColumnDef::new(HummockTimeTravelDelta::VersionDelta) - .blob(BlobSize::Long) + .blob() .null(), ) .to_owned(),