diff --git a/digital_asset_types/src/dao/generated/asset_data.rs b/digital_asset_types/src/dao/generated/asset_data.rs index 17bbc2e43..f6bf697b2 100644 --- a/digital_asset_types/src/dao/generated/asset_data.rs +++ b/digital_asset_types/src/dao/generated/asset_data.rs @@ -27,7 +27,6 @@ pub struct Model { pub raw_name: Option>, pub raw_symbol: Option>, pub base_info_seq: Option, - pub download_metadata_seq: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)] @@ -43,7 +42,6 @@ pub enum Column { RawName, RawSymbol, BaseInfoSeq, - DownloadMetadataSeq, } #[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)] @@ -78,7 +76,6 @@ impl ColumnTrait for Column { Self::RawName => ColumnType::Binary.def().null(), Self::RawSymbol => ColumnType::Binary.def().null(), Self::BaseInfoSeq => ColumnType::BigInteger.def().null(), - Self::DownloadMetadataSeq => ColumnType::BigInteger.def().null(), } } } diff --git a/digital_asset_types/src/dao/generated/sea_orm_active_enums.rs b/digital_asset_types/src/dao/generated/sea_orm_active_enums.rs index 90cc813eb..11362ae1c 100644 --- a/digital_asset_types/src/dao/generated/sea_orm_active_enums.rs +++ b/digital_asset_types/src/dao/generated/sea_orm_active_enums.rs @@ -3,6 +3,34 @@ use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; +#[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] +#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "task_status")] +pub enum TaskStatus { + #[sea_orm(string_value = "failed")] + Failed, + #[sea_orm(string_value = "pending")] + Pending, + #[sea_orm(string_value = "running")] + Running, + #[sea_orm(string_value = "success")] + Success, +} +#[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] +#[sea_orm( + rs_type = "String", + db_type = "Enum", + enum_name = "specification_versions" +)] +pub enum SpecificationVersions { + #[sea_orm(string_value = "unknown")] + Unknown, + #[sea_orm(string_value = "v0")] + V0, + #[sea_orm(string_value = "v1")] + V1, + #[sea_orm(string_value = "v2")] + V2, +} #[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] #[sea_orm( rs_type = "String", @@ -20,6 +48,16 @@ pub enum RoyaltyTargetType { Unknown, } #[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] +#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "owner_type")] +pub enum OwnerType { + #[sea_orm(string_value = "single")] + Single, + #[sea_orm(string_value = "token")] + Token, + #[sea_orm(string_value = "unknown")] + Unknown, +} +#[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] #[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "mutability")] pub enum Mutability { #[sea_orm(string_value = "immutable")] @@ -30,6 +68,16 @@ pub enum Mutability { Unknown, } #[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] +#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "chain_mutability")] +pub enum ChainMutability { + #[sea_orm(string_value = "immutable")] + Immutable, + #[sea_orm(string_value = "mutable")] + Mutable, + #[sea_orm(string_value = "unknown")] + Unknown, +} +#[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] #[sea_orm( rs_type = "String", db_type = "Enum", @@ -58,16 +106,6 @@ pub enum SpecificationAssetClass { Unknown, } #[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "owner_type")] -pub enum OwnerType { - #[sea_orm(string_value = "single")] - Single, - #[sea_orm(string_value = "token")] - Token, - #[sea_orm(string_value = "unknown")] - Unknown, -} -#[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] #[sea_orm( rs_type = "String", db_type = "Enum", @@ -85,41 +123,3 @@ pub enum V1AccountAttachments { #[sea_orm(string_value = "unknown")] Unknown, } -#[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm( - rs_type = "String", - db_type = "Enum", - enum_name = "specification_versions" -)] -pub enum SpecificationVersions { - #[sea_orm(string_value = "unknown")] - Unknown, - #[sea_orm(string_value = "v0")] - V0, - #[sea_orm(string_value = "v1")] - V1, - #[sea_orm(string_value = "v2")] - V2, -} -#[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "task_status")] -pub enum TaskStatus { - #[sea_orm(string_value = "failed")] - Failed, - #[sea_orm(string_value = "pending")] - Pending, - #[sea_orm(string_value = "running")] - Running, - #[sea_orm(string_value = "success")] - Success, -} -#[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "chain_mutability")] -pub enum ChainMutability { - #[sea_orm(string_value = "immutable")] - Immutable, - #[sea_orm(string_value = "mutable")] - Mutable, - #[sea_orm(string_value = "unknown")] - Unknown, -} diff --git a/digital_asset_types/tests/common.rs b/digital_asset_types/tests/common.rs index bf9c88ac1..e486ef289 100644 --- a/digital_asset_types/tests/common.rs +++ b/digital_asset_types/tests/common.rs @@ -86,7 +86,6 @@ pub fn create_asset_data( raw_name: Some(metadata.name.into_bytes().to_vec().clone()), raw_symbol: Some(metadata.symbol.into_bytes().to_vec().clone()), base_info_seq: Some(0), - download_metadata_seq: Some(0), }, ) } diff --git a/digital_asset_types/tests/json_parsing.rs b/digital_asset_types/tests/json_parsing.rs index c10ca12e3..b689010ec 100644 --- a/digital_asset_types/tests/json_parsing.rs +++ b/digital_asset_types/tests/json_parsing.rs @@ -37,7 +37,6 @@ pub async fn parse_onchain_json(json: serde_json::Value) -> Content { raw_name: Some(String::from("Handalf").into_bytes().to_vec()), raw_symbol: Some(String::from("").into_bytes().to_vec()), base_info_seq: Some(0), - download_metadata_seq: Some(0), }; v1_content_from_json(&asset_data).unwrap() diff --git a/migration/src/m20231019_120101_add_seq_numbers_bgum_update_metadata.rs b/migration/src/m20231019_120101_add_seq_numbers_bgum_update_metadata.rs index f0e9d8f40..78e71b21e 100644 --- a/migration/src/m20231019_120101_add_seq_numbers_bgum_update_metadata.rs +++ b/migration/src/m20231019_120101_add_seq_numbers_bgum_update_metadata.rs @@ -15,7 +15,6 @@ impl MigrationTrait for Migration { Table::alter() .table(asset_data::Entity) .add_column(ColumnDef::new(Alias::new("base_info_seq")).big_integer()) - .add_column(ColumnDef::new(Alias::new("download_metadata_seq")).big_integer()) .to_owned(), ) .await?; @@ -38,7 +37,6 @@ impl MigrationTrait for Migration { Table::alter() .table(asset_data::Entity) .drop_column(Alias::new("base_info_seq")) - .drop_column(Alias::new("download_metadata_seq")) .to_owned(), ) .await?; diff --git a/nft_ingester/src/program_transformers/token_metadata/v1_asset.rs b/nft_ingester/src/program_transformers/token_metadata/v1_asset.rs index 6ee9c64ae..74a52f29f 100644 --- a/nft_ingester/src/program_transformers/token_metadata/v1_asset.rs +++ b/nft_ingester/src/program_transformers/token_metadata/v1_asset.rs @@ -150,7 +150,6 @@ pub async fn save_v1_asset( raw_name: Set(Some(name.to_vec())), raw_symbol: Set(Some(symbol.to_vec())), base_info_seq: Set(Some(0)), - download_metadata_seq: Set(Some(0)), }; let txn = conn.begin().await?; let mut query = asset_data::Entity::insert(asset_data_model) @@ -166,7 +165,6 @@ pub async fn save_v1_asset( asset_data::Column::RawName, asset_data::Column::RawSymbol, asset_data::Column::BaseInfoSeq, - asset_data::Column::DownloadMetadataSeq, ]) .to_owned(), )