Change:
The option for automatically creating the default admin users does not work, at least for sqlite. Steps to reproduce the behavior: with and generations admin has not been created It should be possible to create the admin users by default. <details<summaryjournalctl -u writefreely-sqlite-init.service</summary<pre<codeout 15 21:19:47 ghost systemd[1]: Starting writefreely-sqlite-init.service... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Loading configuration... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Connecting to sqlite3 database... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table accesstokens... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table appcontent... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table appmigrations... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table collectionattributes... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table collectionkeys... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table collectionpasswords... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table collectionredirects... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table collections... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table posts... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table remotefollows... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table remoteuserkeys... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table remoteusers... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table userattributes... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table userinvites... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table users... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Creating table usersinvited... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Created. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Initializing appmigrations table... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Running migrations... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Migrating to V2: support dynamic instance pages out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Migrating to V3: support users suspension out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Migrating to V4: support oauth out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Migrating to V5: support slack oauth out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Migrating to V6: support ActivityPub mentions out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Migrating to V7: support oauth attach out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Migrating to V8: support oauth via invite out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Migrating to V9: optimize drafts retrieval out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Migrating to V10: support post signatures out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Done. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Closing database connection... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Loading configuration... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Connecting to sqlite3 database... out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Database up-to-date. No migrations to run. out 15 21:19:47 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:19:47 Closing database connection... out 15 21:19:47 ghost systemd[1]: writefreely-sqlite-init.service: Deactivated successfully. out 15 21:19:47 ghost systemd[1]: Finished writefreely-sqlite-init.service. out 15 21:22:34 ghost systemd[1]: Starting writefreely-sqlite-init.service... out 15 21:22:34 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:22:34 Loading configuration... out 15 21:22:34 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:22:34 Connecting to sqlite3 database... out 15 21:22:34 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:22:34 Database up-to-date. No migrations to run. out 15 21:22:34 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:22:34 Closing database connection... out 15 21:22:34 ghost systemd[1]: writefreely-sqlite-init.service: Deactivated successfully. out 15 21:22:34 ghost systemd[1]: Finished writefreely-sqlite-init.service. out 15 21:24:26 ghost systemd[1]: Starting writefreely-sqlite-init.service... out 15 21:24:27 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:24:27 Loading configuration... out 15 21:24:27 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:24:27 Connecting to sqlite3 database... out 15 21:24:27 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:24:27 Database up-to-date. No migrations to run. out 15 21:24:27 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:24:27 Closing database connection... out 15 21:24:27 ghost writefreely-sqlite-init-start[]: /nix/store/m9syqqg7kjhdal758xkbhfpgc3s9085z-unit-script-writefreely-sqlite-init-start/bin/writefreely-sqlite-init-start: line 14: SELECT COUNT() FROM users: command not found out 15 21:24:27 ghost systemd[1]: writefreely-sqlite-init.service: Deactivated successfully. out 15 21:24:27 ghost systemd[1]: Finished writefreely-sqlite-init.service. out 15 21:26:42 ghost systemd[1]: Starting writefreely-sqlite-init.service... out 15 21:26:42 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:26:42 Loading configuration... out 15 21:26:42 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:26:42 Connecting to sqlite3 database... out 15 21:26:42 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:26:42 Database up-to-date. No migrations to run. out 15 21:26:42 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:26:42 Closing database connection... out 15 21:26:42 ghost writefreely-sqlite-init-start[]: /nix/store/m9syqqg7kjhdal758xkbhfpgc3s9085z-unit-script-writefreely-sqlite-init-start/bin/writefreely-sqlite-init-start: line 14: SELECT COUNT() FROM users: command not found out 15 21:26:42 ghost systemd[1]: writefreely-sqlite-init.service: Deactivated successfully. out 15 21:26:42 ghost systemd[1]: Finished writefreely-sqlite-init.service. out 15 21:27:47 ghost systemd[1]: Starting writefreely-sqlite-init.service... out 15 21:27:47 ghost (it-start)[]: writefreely-sqlite-init.service: Changing to the requested working directory failed: No such file or directory out 15 21:27:47 ghost (it-start)[]: writefreely-sqlite-init.service: Failed at step CHDIR spawning /nix/store/m9syqqg7kjhdal758xkbhfpgc3s9085z-unit-script-writefreely-sqlite-init-start/bin/writefreely-sqlite-init-start: No such file or directory out 15 21:27:47 ghost systemd[1]: writefreely-sqlite-init.service: Main process exited, code=exited, status=200/CHDIR out 15 21:27:47 ghost systemd[1]: writefreely-sqlite-init.service: Failed with result 'exit-code'. out 15 21:27:47 ghost systemd[1]: Failed to start writefreely-sqlite-init.service. out 15 21:28:16 ghost systemd[1]: Starting writefreely-sqlite-init.service... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Loading configuration... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Connecting to sqlite3 database... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table accesstokens... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table appcontent... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table appmigrations... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table collectionattributes... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table collectionkeys... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table collectionpasswords... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table collectionredirects... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table collections... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table posts... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table remotefollows... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table remoteuserkeys... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table remoteusers... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table userattributes... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table userinvites... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table users... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Creating table usersinvited... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Created. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Initializing appmigrations table... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Running migrations... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Migrating to V2: support dynamic instance pages out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Migrating to V3: support users suspension out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Migrating to V4: support oauth out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Migrating to V5: support slack oauth out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Migrating to V6: support ActivityPub mentions out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Migrating to V7: support oauth attach out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Migrating to V8: support oauth via invite out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Migrating to V9: optimize drafts retrieval out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Migrating to V10: support post signatures out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Done. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Closing database connection... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Loading configuration... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Connecting to sqlite3 database... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Database up-to-date. No migrations to run. out 15 21:28:17 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:28:17 Closing database connection... out 15 21:28:17 ghost writefreely-sqlite-init-start[]: /nix/store/m9syqqg7kjhdal758xkbhfpgc3s9085z-unit-script-writefreely-sqlite-init-start/bin/writefreely-sqlite-init-start: line 14: SELECT COUNT() FROM users: command not found out 15 21:28:17 ghost systemd[1]: writefreely-sqlite-init.service: Deactivated successfully. out 15 21:28:17 ghost systemd[1]: Finished writefreely-sqlite-init.service. out 15 21:29:45 ghost systemd[1]: Starting writefreely-sqlite-init.service... out 15 21:29:45 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:29:45 Loading configuration... out 15 21:29:45 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:29:45 Connecting to sqlite3 database... out 15 21:29:45 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:29:45 Database up-to-date. No migrations to run. out 15 21:29:45 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:29:45 Closing database connection... out 15 21:29:45 ghost writefreely-sqlite-init-start[]: /nix/store/m9syqqg7kjhdal758xkbhfpgc3s9085z-unit-script-writefreely-sqlite-init-start/bin/writefreely-sqlite-init-start: line 14: SELECT COUNT() FROM users: command not found out 15 21:29:45 ghost systemd[1]: writefreely-sqlite-init.service: Deactivated successfully. out 15 21:29:45 ghost systemd[1]: Finished writefreely-sqlite-init.service. out 15 21:32:57 ghost systemd[1]: Starting writefreely-sqlite-init.service... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Loading configuration... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Connecting to sqlite3 database... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table accesstokens... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table appcontent... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table appmigrations... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table collectionattributes... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table collectionkeys... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table collectionpasswords... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table collectionredirects... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table collections... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table posts... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table remotefollows... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table remoteuserkeys... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table remoteusers... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table userattributes... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table userinvites... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table users... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Creating table usersinvited... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Created. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Initializing appmigrations table... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Running migrations... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Migrating to V2: support dynamic instance pages out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Migrating to V3: support users suspension out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Migrating to V4: support oauth out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Migrating to V5: support slack oauth out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Migrating to V6: support ActivityPub mentions out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Migrating to V7: support oauth attach out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Migrating to V8: support oauth via invite out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Migrating to V9: optimize drafts retrieval out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Migrating to V10: support post signatures out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Done. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Closing database connection... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Loading configuration... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Connecting to sqlite3 database... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Database up-to-date. No migrations to run. out 15 21:32:57 ghost writefreely-sqlite-init-start[]: 2023/10/15 21:32:57 Closing database connection... out 15 21:32:57 ghost writefreely-sqlite-init-start[]: /nix/store/m9syqqg7kjhdal758xkbhfpgc3s9085z-unit-script-writefreely-sqlite-init-start/bin/writefreely-sqlite-init-start: line 14: SELECT COUNT(*) FROM users: command not found out 15 21:32:57 ghost systemd[1]: writefreely-sqlite-init.service: Deactivated successfully. out 15 21:32:57 ghost systemd[1]: Finished writefreely-sqlite-init.service. </code</pre</details<!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. -- Please run and paste the result.
Interesting, I’ll try and take a look when I next get a chance. Are these logs from you running switch multiple times? Or is the unit constantly restarting?
Those logs are from running switch multiple times or restarting the unit manually, it's not restarting in a loop.

Discussion:
withConfigFile '' query () { local result=$(${sqlite}/bin/sqlite3  <del> '${cfg.stateDir}/${settings.database.filename}' </del> <ins> '${cfg.stateDir}/${settings.database.filename}'  </ins> "$1"  )