title: How to make Ruby on Rails create SQLite database with foreign keys enabled?
body: <p>I am newbie to Ruby on Rails and I am using SQLite3 as database for my sample project. I am trying to create ordinary one to many relationship between two models (eg. each Product has one Owner, and each Owner can have many Products). This works fine and database schema is created properly. However, when I open development.sqlite3 in database management tool (I use free SQLite Express Personal <a href="http://www.sqliteexpert.com/download.html" rel="noreferrer">http://www.sqliteexpert.com/download.html</a>) I don't see that database has referential integrity. There are no foreign keys listed for Product table even though it does contain <strong>owner_id</strong> column. </p>
  
  <p>I tried changing database.yml by adding options key:</p>
  
  <pre><code>default: &amp;default
  adapter: sqlite3
  pool: 5
  timeout: 5000
  options: "PRAGMA foreign_keys=ON"
  </code></pre>
  
  <p>And then recreate database with:</p>
  
  <pre><code>rake db:drop db:create db:migrate
  </code></pre>
  
  <p>This recreates database but again there is no foreign keys listed.</p>
  
  <p>Am I doing something wrong? Is there solution for this at all.
  (PS. I am running all this on Windows 8.1 if that matters)</p>