rust_ef/migration/
types.rs1#[derive(Debug, Clone)]
5pub struct Migration {
6 pub id: String,
7 pub description: String,
8 pub up_sql: String,
9 pub down_sql: String,
10}
11
12#[derive(Debug, Clone)]
15pub struct ModelSnapshot {
16 pub migration_id: String,
17 pub entity_types: Vec<SnapshotEntityType>,
18}
19
20#[derive(Debug, Clone)]
22pub struct SnapshotEntityType {
23 pub type_name: String,
24 pub table_name: String,
25 pub columns: Vec<SnapshotColumn>,
26}
27
28#[derive(Debug, Clone, PartialEq, Default)]
30pub struct SnapshotColumn {
31 pub field_name: String,
32 pub column_name: String,
33 pub type_name: String,
34 pub is_primary_key: bool,
35 pub is_required: bool,
36 pub is_foreign_key: bool,
37 pub max_length: Option<usize>,
38 pub is_auto_increment: bool,
39 pub is_sequence: bool,
41 pub sequence_name: Option<String>,
43 pub fk_referenced_table: Option<String>,
45 pub fk_referenced_column: Option<String>,
47 pub has_index: bool,
49 pub is_unique: bool,
51 pub fk_on_delete: Option<String>,
54}