use super::PhoenixV1Account;
pub struct PhoenixV1AccountsMigration;
impl sqlx_migrator::Migration<sqlx::Postgres> for PhoenixV1AccountsMigration {
fn app(&self) -> &str {
"phoenix-v1"
}
fn name(&self) -> &str {
"phoenix_v1_accounts"
}
fn operations(&self) -> Vec<Box<dyn sqlx_migrator::Operation<sqlx::Postgres>>> {
vec![]
}
fn parents(&self) -> Vec<Box<dyn sqlx_migrator::Migration<sqlx::Postgres>>> {
vec![]
}
}
pub struct PhoenixV1AccountWithMetadata(
pub PhoenixV1Account,
pub carbon_core::account::AccountMetadata,
);
impl From<(PhoenixV1Account, carbon_core::account::AccountMetadata)>
for PhoenixV1AccountWithMetadata
{
fn from(value: (PhoenixV1Account, carbon_core::account::AccountMetadata)) -> Self {
PhoenixV1AccountWithMetadata(value.0, value.1)
}
}
#[async_trait::async_trait]
impl carbon_core::postgres::operations::Insert for PhoenixV1AccountWithMetadata {
async fn insert(&self, _pool: &sqlx::PgPool) -> carbon_core::error::CarbonResult<()> {
unreachable!("No accounts to decode")
}
}
#[async_trait::async_trait]
impl carbon_core::postgres::operations::Upsert for PhoenixV1AccountWithMetadata {
async fn upsert(&self, _pool: &sqlx::PgPool) -> carbon_core::error::CarbonResult<()> {
unreachable!("No accounts to decode")
}
}