use tosin::db::migration::{DatabaseChange, Migration}; use tosin::db::models::Field; pub const MIGRATION: Migration = Migration { id: 1usize, name: "auto", prereqs: &[], changes: &[ DatabaseChange::CreateModel { name: "Question", fields: &[ Field::IntField { name: "id" }, Field::CharField { name: "question_text", max_length: Some(200usize), }, Field::DateTimeField { name: "pub_date" }, ], options: &[], }, DatabaseChange::CreateModel { name: "Choice", fields: &[ Field::IntField { name: "id" }, Field::IntField { name: "question" }, Field::CharField { name: "choice_text", max_length: Some(200usize), }, Field::IntField { name: "votes" }, ], options: &[], }, ], };