diff --git a/database/database.go b/database/database.go index 3062341..35e281a 100644 --- a/database/database.go +++ b/database/database.go @@ -43,6 +43,10 @@ func New(dbType string, uri string) (*Database, error) { return nil, err } + if dbType == "sqlite3" { + _, _ = conn.Exec("PRAGMA foreign_keys = ON") + } + db := &Database{ DB: conn, log: log.Sub("Database"),