//! Migration: create Testimonial table #[derive(Debug, Copy, Clone)] pub(super) struct Migration; impl ::cot::db::migrations::Migration for Migration { const APP_NAME: &'static str = "web-petting"; const MIGRATION_NAME: &'static str = "m_0005_testimonials"; const DEPENDENCIES: &'static [::cot::db::migrations::MigrationDependency] = &[::cot::db::migrations::MigrationDependency::migration( "web-petting", "m_0004_visit_public_notes", )]; const OPERATIONS: &'static [::cot::db::migrations::Operation] = &[::cot::db::migrations::Operation::create_model() .table_name(::cot::db::Identifier::new("web_petting__testimonial")) .fields(&[ ::cot::db::migrations::Field::new( ::cot::db::Identifier::new("id"), as ::cot::db::DatabaseField>::TYPE, ) .auto() .primary_key() .set_null( as ::cot::db::DatabaseField>::NULLABLE), ::cot::db::migrations::Field::new( ::cot::db::Identifier::new("text"), ::TYPE, ) .set_null(::NULLABLE), ::cot::db::migrations::Field::new( ::cot::db::Identifier::new("author_note"), as ::cot::db::DatabaseField>::TYPE, ) .set_null( as ::cot::db::DatabaseField>::NULLABLE), ::cot::db::migrations::Field::new( ::cot::db::Identifier::new("image_path"), as ::cot::db::DatabaseField>::TYPE, ) .set_null( as ::cot::db::DatabaseField>::NULLABLE), ::cot::db::migrations::Field::new( ::cot::db::Identifier::new("status"), ::TYPE, ) .set_null(::NULLABLE), ::cot::db::migrations::Field::new( ::cot::db::Identifier::new("sort_order"), ::TYPE, ) .set_null(::NULLABLE), ::cot::db::migrations::Field::new( ::cot::db::Identifier::new("created_at"), ::TYPE, ) .set_null(::NULLABLE), ]) .build()]; }