chore: enable sqlite wal mode for dev and prod

better concurrency and crash recovery for web workloads

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jamey 2026-01-31 14:30:27 +00:00
parent a44790362a
commit bbd748f123
2 changed files with 5 additions and 1 deletions

View File

@ -4,6 +4,8 @@ import Config
config :simpleshop_theme, SimpleshopTheme.Repo, config :simpleshop_theme, SimpleshopTheme.Repo,
database: Path.expand("../simpleshop_theme_dev.db", __DIR__), database: Path.expand("../simpleshop_theme_dev.db", __DIR__),
pool_size: 5, pool_size: 5,
journal_mode: :wal,
busy_timeout: 5000,
stacktrace: true, stacktrace: true,
show_sensitive_data_on_connection_error: true show_sensitive_data_on_connection_error: true

View File

@ -30,7 +30,9 @@ if config_env() == :prod do
config :simpleshop_theme, SimpleshopTheme.Repo, config :simpleshop_theme, SimpleshopTheme.Repo,
database: database_path, database: database_path,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "5") pool_size: String.to_integer(System.get_env("POOL_SIZE") || "5"),
journal_mode: :wal,
busy_timeout: 5000
# The secret key base is used to sign/encrypt cookies and other secrets. # The secret key base is used to sign/encrypt cookies and other secrets.
# A default value is used in config/dev.exs and config/test.exs but you # A default value is used in config/dev.exs and config/test.exs but you