Skip to content

Commit 9b562e7

Browse files
committed
db.d: run PRAGMA optimize after creating tables
1 parent 9a807f7 commit 9b562e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/db.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ final class Database
193193
foreach (ref problem ; query("PRAGMA integrity_check;"))
194194
if (log_db) writeln("[DB] Check [", problem[0], "]");
195195

196-
query("PRAGMA optimize=0x10002;"); // =all tables
197196
query(users_table_sql);
198197
query(rooms_table_sql);
199198
query(room_members_sql);
@@ -204,6 +203,8 @@ final class Database
204203
query(rooms_owner_type_index_sql);
205204
add_new_columns();
206205
init_config();
206+
207+
query("PRAGMA optimize=0x10002;"); // =all tables
207208
}
208209

209210
~this()

0 commit comments

Comments
 (0)