24 lines
1021 B
Rust
24 lines
1021 B
Rust
//! 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";
|
||
|
|
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()
|
||
|
|
.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,
|
||
|
|
)
|
||
|
|
.set_null(<Option<String> as ::cot::db::DatabaseField>::NULLABLE)
|
||
|
|
)
|
||
|
|
.build(),
|
||
|
|
];
|
||
|
|
}
|