text instead of string payload
This commit is contained in:
parent
825ba006f1
commit
9dd0bae40a
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -1676,7 +1676,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "entities"
|
name = "entities"
|
||||||
version = "0.30.0"
|
version = "0.31.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ethers",
|
"ethers",
|
||||||
"sea-orm",
|
"sea-orm",
|
||||||
@ -3330,7 +3330,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "migration"
|
name = "migration"
|
||||||
version = "0.30.0"
|
version = "0.31.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"sea-orm-migration",
|
"sea-orm-migration",
|
||||||
"tokio",
|
"tokio",
|
||||||
@ -6943,7 +6943,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "web3_proxy"
|
name = "web3_proxy"
|
||||||
version = "0.30.0"
|
version = "0.31.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "entities"
|
name = "entities"
|
||||||
version = "0.30.0"
|
version = "0.31.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "migration"
|
name = "migration"
|
||||||
version = "0.30.0"
|
version = "0.31.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ mod m20230512_220213_allow_null_rpc_key_id_in_stats_v2;
|
|||||||
mod m20230514_114803_admin_add_credits;
|
mod m20230514_114803_admin_add_credits;
|
||||||
mod m20230607_221917_total_deposits;
|
mod m20230607_221917_total_deposits;
|
||||||
mod m20230615_221201_handle_payment_uncles;
|
mod m20230615_221201_handle_payment_uncles;
|
||||||
|
mod m20230618_230611_longer_payload;
|
||||||
|
|
||||||
pub struct Migrator;
|
pub struct Migrator;
|
||||||
|
|
||||||
@ -67,6 +68,7 @@ impl MigratorTrait for Migrator {
|
|||||||
Box::new(m20230514_114803_admin_add_credits::Migration),
|
Box::new(m20230514_114803_admin_add_credits::Migration),
|
||||||
Box::new(m20230607_221917_total_deposits::Migration),
|
Box::new(m20230607_221917_total_deposits::Migration),
|
||||||
Box::new(m20230615_221201_handle_payment_uncles::Migration),
|
Box::new(m20230615_221201_handle_payment_uncles::Migration),
|
||||||
|
Box::new(m20230618_230611_longer_payload::Migration),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
39
migration/src/m20230618_230611_longer_payload.rs
Normal file
39
migration/src/m20230618_230611_longer_payload.rs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
use sea_orm_migration::prelude::*;
|
||||||
|
|
||||||
|
#[derive(DeriveMigrationName)]
|
||||||
|
pub struct Migration;
|
||||||
|
|
||||||
|
#[async_trait::async_trait]
|
||||||
|
impl MigrationTrait for Migration {
|
||||||
|
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
|
||||||
|
manager
|
||||||
|
.alter_table(
|
||||||
|
Table::alter()
|
||||||
|
.table(AdminTrail::Table)
|
||||||
|
.modify_column(ColumnDef::new(Post::Endpoint).text().not_null())
|
||||||
|
.modify_column(ColumnDef::new(Post::Payload).text().not_null())
|
||||||
|
.to_owned(),
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
|
||||||
|
manager
|
||||||
|
.alter_table(
|
||||||
|
Table::alter()
|
||||||
|
.table(Post::AdminTrail)
|
||||||
|
.modify_column(ColumnDef::new(Post::Endpoint).string().not_null())
|
||||||
|
.modify_column(ColumnDef::new(Post::Payload).string().not_null())
|
||||||
|
.to_owned(),
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Learn more at https://docs.rs/sea-query#iden
|
||||||
|
#[derive(Iden)]
|
||||||
|
enum AdminTrail {
|
||||||
|
Table,
|
||||||
|
Endpoint,
|
||||||
|
Payload,
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "web3_proxy"
|
name = "web3_proxy"
|
||||||
version = "0.30.0"
|
version = "0.31.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
default-run = "web3_proxy_cli"
|
default-run = "web3_proxy_cli"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user