windmill_api/models/
datatable_migration.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct DatatableMigration {
16 #[serde(rename = "datatable")]
17 pub datatable: String,
18 #[serde(rename = "timestamp")]
19 pub timestamp: i64,
20 #[serde(rename = "name")]
21 pub name: String,
22 #[serde(rename = "code_up")]
23 pub code_up: String,
24 #[serde(rename = "code_down", skip_serializing_if = "Option::is_none")]
25 pub code_down: Option<String>,
26}
27
28impl DatatableMigration {
29 pub fn new(datatable: String, timestamp: i64, name: String, code_up: String) -> DatatableMigration {
30 DatatableMigration {
31 datatable,
32 timestamp,
33 name,
34 code_up,
35 code_down: None,
36 }
37 }
38}
39