sea-schema-sync 0.17.0-rc.16

🌿 SQL schema definition and discovery
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! To write [`mysql::Schema`] to SQL statements

mod column;
mod foreign_key;
mod index;
mod table;
mod 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()
    }
}