|
@@ -282,7 +282,11 @@ pub(crate) fn collect_from_database<DB: Database>() -> DatabaseSchema {
|
|
|
|
|
|
let mut queries = vec![];
|
|
|
|
|
|
- for (table_name, table) in tables {
|
|
|
+ // create sorted table list
|
|
|
+ let mut sorted_tables : Vec<_> = tables.into_iter().collect();
|
|
|
+ sorted_tables.sort_by(|a, b| a.0.cmp(&b.0));
|
|
|
+
|
|
|
+ for (table_name, table) in sorted_tables {
|
|
|
let create_sql = table.build_creation_query();
|
|
|
|
|
|
table_name.hash(&mut signature_hasher);
|
|
@@ -295,8 +299,12 @@ pub(crate) fn collect_from_database<DB: Database>() -> DatabaseSchema {
|
|
|
queries.push(iinfo.build_creation_query());
|
|
|
}
|
|
|
|
|
|
+ let signature = signature_hasher.finish();
|
|
|
+
|
|
|
+ log::trace!("Schema signature: {signature:x}");
|
|
|
+
|
|
|
DatabaseSchema {
|
|
|
- signature: signature_hasher.finish(),
|
|
|
+ signature,
|
|
|
queries,
|
|
|
}
|
|
|
}
|