Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate string len
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
BugenZhao committed Nov 1, 2024
1 parent 22fa07e commit 9041be4
Showing 12 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/meta/model/src/actor.rs
Original file line number Diff line number Diff line change
@@ -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,
2 changes: 1 addition & 1 deletion src/meta/model/src/actor_dispatcher.rs
Original file line number Diff line number Diff line change
@@ -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,
2 changes: 1 addition & 1 deletion src/meta/model/src/catalog_version.rs
Original file line number Diff line number Diff line change
@@ -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,
2 changes: 1 addition & 1 deletion src/meta/model/src/fragment.rs
Original file line number Diff line number Diff line change
@@ -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,
2 changes: 1 addition & 1 deletion src/meta/model/src/function.rs
Original file line number Diff line number Diff line change
@@ -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,
4 changes: 2 additions & 2 deletions src/meta/model/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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,
@@ -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,
2 changes: 1 addition & 1 deletion src/meta/model/src/object.rs
Original file line number Diff line number Diff line change
@@ -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,
1 change: 0 additions & 1 deletion src/meta/model/src/secret.rs
Original file line number Diff line number Diff line change
@@ -23,7 +23,6 @@ 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))")]
pub value: Vec<u8>,
}

2 changes: 1 addition & 1 deletion src/meta/model/src/sink.rs
Original file line number Diff line number Diff line change
@@ -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,
4 changes: 2 additions & 2 deletions src/meta/model/src/table.rs
Original file line number Diff line number Diff line change
@@ -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,
@@ -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,
2 changes: 1 addition & 1 deletion src/meta/model/src/user_privilege.rs
Original file line number Diff line number Diff line change
@@ -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,
4 changes: 2 additions & 2 deletions src/meta/model/src/worker.rs
Original file line number Diff line number Diff line change
@@ -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,
@@ -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,

0 comments on commit 9041be4

Please sign in to comment.