//! Migration: add telegram_chat_id and telegram_notifications to User #[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_0006_user_telegram"; const DEPENDENCIES: &'static [::cot::db::migrations::MigrationDependency] = &[::cot::db::migrations::MigrationDependency::migration( "web-petting", "m_0005_testimonials", )]; const OPERATIONS: &'static [::cot::db::migrations::Operation] = &[ ::cot::db::migrations::Operation::add_field() .table_name(::cot::db::Identifier::new("web_petting__user")) .field( ::cot::db::migrations::Field::new( ::cot::db::Identifier::new("telegram_chat_id"), as ::cot::db::DatabaseField>::TYPE, ) .set_null( as ::cot::db::DatabaseField>::NULLABLE), ) .build(), ::cot::db::migrations::Operation::add_field() .table_name(::cot::db::Identifier::new("web_petting__user")) .field( ::cot::db::migrations::Field::new( ::cot::db::Identifier::new("telegram_notifications"), as ::cot::db::DatabaseField>::TYPE, ) .set_null( as ::cot::db::DatabaseField>::NULLABLE), ) .build(), ]; }