1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
mod column;
mod constraints;
mod enumeration;
mod schema;
mod table;
mod types;

pub use column::*;
pub use constraints::*;
pub use enumeration::*;
pub use schema::*;
pub use table::*;
pub use types::*;

use super::def::Schema;
use sea_query::TableCreateStatement;

impl Schema {
    pub fn write(&self) -> Vec<TableCreateStatement> {
        self.tables.iter().map(|table| table.write()).collect()
    }
}