title: Sqlite trigger is not working
body: <p>I'm trying to achieve automatic timestamps updating, when status of some devices is changed.
  I have a table like this for devices:</p>
  
  <pre><code>CREATE TABLE devices(
    id int PRIMARY KEY,
    status text,
    "timestamp" datetime,
    FOREIGN KEY (timestamp) REFERENCES timestamps (controls)
  );
  </code></pre>
  
  <p>This is table for timestamps:</p>
  
  <pre><code>CREATE TABLE timestamps (
    "database" datetime NOT NULL DEFAULT(CURRENT_TIMESTAMP),
    controls datetime NOT NULL DEFAULT(CURRENT_TIMESTAMP)
  );
  </code></pre>
  
  <p>When I try this trigger, and modify <code>status</code> column for rows in <code>devices</code> table, I don't see anything changes in <code>timestamps</code> table (particularly it is blank as it was).</p>
  
  <pre><code>CREATE TRIGGER update_timestamps UPDATE OF status ON devices 
  BEGIN
    UPDATE timestamps SET controls=datetime('now');
  END;
  </code></pre>
  
  <p>Could you please have a look what is wrong with it?</p>