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.12.15

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

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "cratesio_index")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i64,
    #[sea_orm(column_type = "Text")]
    pub name: String,
    #[sea_orm(column_type = "Text")]
    pub vers: String,
    #[sea_orm(column_type = "JsonBinary", nullable)]
    pub deps: Option<Json>,
    #[sea_orm(column_type = "Text")]
    pub cksum: String,
    #[sea_orm(column_type = "JsonBinary", nullable)]
    pub features: Option<Json>,
    #[sea_orm(column_type = "JsonBinary", nullable)]
    pub features2: Option<Json>,
    pub yanked: bool,
    #[sea_orm(column_type = "Text", nullable)]
    pub links: Option<String>,
    pub v: i32,
    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 {}