2026-04-29 17:49:07 +03:00
|
|
|
//! Migration: add client_feedback to Visit
|
|
|
|
|
|
|
|
|
|
#[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_0003_visit_feedback";
|
2026-05-11 11:34:11 +01:00
|
|
|
const DEPENDENCIES: &'static [::cot::db::migrations::MigrationDependency] =
|
|
|
|
|
&[::cot::db::migrations::MigrationDependency::migration(
|
|
|
|
|
"web-petting",
|
|
|
|
|
"m_0002_visit_schedule",
|
|
|
|
|
)];
|
|
|
|
|
const OPERATIONS: &'static [::cot::db::migrations::Operation] =
|
|
|
|
|
&[::cot::db::migrations::Operation::add_field()
|
2026-04-29 17:49:07 +03:00
|
|
|
.table_name(::cot::db::Identifier::new("web_petting__visit"))
|
|
|
|
|
.field(
|
|
|
|
|
::cot::db::migrations::Field::new(
|
|
|
|
|
::cot::db::Identifier::new("client_feedback"),
|
|
|
|
|
<Option<String> as ::cot::db::DatabaseField>::TYPE,
|
|
|
|
|
)
|
2026-05-11 11:34:11 +01:00
|
|
|
.set_null(<Option<String> as ::cot::db::DatabaseField>::NULLABLE),
|
2026-04-29 17:49:07 +03:00
|
|
|
)
|
2026-05-11 11:34:11 +01:00
|
|
|
.build()];
|
2026-04-29 17:49:07 +03:00
|
|
|
}
|