From 0353cf2c90ac314d73eb584a57c7bf1790586ee8 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Wed, 23 Aug 2023 11:50:33 -0400 Subject: [PATCH] docs: add sqlite foreign key note --- README.md | 3 ++- server/config/file.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d7101df5..3eaaf80ac 100644 --- a/README.md +++ b/README.md @@ -200,7 +200,8 @@ db: driver: "sqlite" # The database data source name. # This is driver specific and can be a file path or connection string. - data_source: "soft-serve.db" + # Make sure foreign key support is enabled when using SQLite. + data_source: "soft-serve.db?_pragma=busy_timeout(5000)&_pragma=foreign_keys(1)" # Git LFS configuration. lfs: diff --git a/server/config/file.go b/server/config/file.go index 7caa446f0..6560dd15c 100644 --- a/server/config/file.go +++ b/server/config/file.go @@ -88,6 +88,7 @@ db: driver: "{{ .DB.Driver }}" # The database data source name. # This is driver specific and can be a file path or connection string. + # Make sure foreign key support is enabled when using SQLite. data_source: "{{ .DB.DataSource }}" # Git LFS configuration.