Revert explicit foreign_keys option; rely on Sequel default
Sequel's SQLite adapter already enables PRAGMA foreign_keys on every
connection, so passing the option adds nothing. Keep app.rb as-is and
document that the default gives Domus enforcement for free.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQTgGstuG7U9yzrtK6emxy
change
commit cb858cf0e71832acb00eb4418fcb4076253ea948
author Claude <noreply@anthropic.com>
date
parent fdd7e094
diff --git a/.claude/skills/sequel/SKILL.md b/.claude/skills/sequel/SKILL.md
index 93fec86..aeffce8 100644
--- a/.claude/skills/sequel/SKILL.md
+++ b/.claude/skills/sequel/SKILL.md
@@ -13,8 +13,7 @@ Roda app's `opts`.
 
 ```ruby
 # lib/app.rb
-@db = Sequel.sqlite(config.database_url, foreign_keys: true)
-#                   file path, or ":memory:" in tests
+@db = Sequel.sqlite(config.database_url)   # file path, or ":memory:" in tests
 ```
 
 `App#db` is the `Sequel::Database`. Routes reach it via `app.db` (see the
@@ -23,10 +22,9 @@ migrations into it (`test/test_helper.rb`). A `:memory:` database is private to
 its single connection — fine for the test suite's one-connection use.
 
 > **Foreign keys are enforced.** Raw SQLite leaves `PRAGMA foreign_keys` off,
-> but Sequel's SQLite adapter turns it on for every connection by default, and
-> `lib/app.rb` also passes `foreign_keys: true` explicitly so the intent is
-> visible and pinned. So the `foreign_key` columns enforce referential
-> integrity at runtime — cascade / restrict behavior applies.
+> but Sequel's SQLite adapter turns it on for every connection by default — so
+> Domus gets it for free without passing any option. The `foreign_key` columns
+> enforce referential integrity at runtime; cascade / restrict behavior applies.
 
 ## Schema
 
diff --git a/lib/app.rb b/lib/app.rb
index 4638176..f72658a 100644
--- a/lib/app.rb
+++ b/lib/app.rb
@@ -9,7 +9,7 @@ module Domus
 
     def initialize(config = Config.env)
       @config = config
-      @db = Sequel.sqlite(config.database_url, foreign_keys: true)
+      @db = Sequel.sqlite(config.database_url)
     end
 
     def file_path(record)