kellnr-migration 5.14.0

Kellnr is a self-hosted registry for Rust crates with support for rustdocs and crates.io caching.
Documentation
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.1

use sea_orm::entity::prelude::*;

#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "cratesio_meta")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i64,
    #[sea_orm(column_type = "Text")]
    pub version: String,
    pub downloads: i64,
    pub crates_io_fk: i64,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
    #[sea_orm(
        belongs_to = "super::cratesio_crate::Entity",
        from = "Column::CratesIoFk",
        to = "super::cratesio_crate::Column::Id",
        on_update = "NoAction",
        on_delete = "Cascade"
    )]
    CratesioCrate,
}

impl Related<super::cratesio_crate::Entity> for Entity {
    fn to() -> RelationDef {
        Relation::CratesioCrate.def()
    }
}

impl ActiveModelBehavior for ActiveModel {}