summary refs log tree commit diff
path: root/synapse/storage/prepare_database.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/prepare_database.py')
-rw-r--r--synapse/storage/prepare_database.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/prepare_database.py b/synapse/storage/prepare_database.py
index 07478b6672..b81c05369f 100644
--- a/synapse/storage/prepare_database.py
+++ b/synapse/storage/prepare_database.py
@@ -146,9 +146,9 @@ def _setup_new_database(cur, database_engine):
 
     directory_entries = os.listdir(sql_dir)
 
-    for filename in fnmatch.filter(directory_entries, "*.sql") + fnmatch.filter(
+    for filename in sorted(fnmatch.filter(directory_entries, "*.sql") + fnmatch.filter(
         directory_entries, "*.sql." + specific
-    ):
+    )):
         sql_loc = os.path.join(sql_dir, filename)
         logger.debug("Applying schema %s", sql_loc)
         executescript(cur, sql_loc)