title: Protect column, disallow update, only allow insert if NULL in MySQL
body: <p>I want to protect existing dates in a date column from being overwritten. So disallow updates to the date column and only allow inserts if the existing field value is NULL (date column default is NULL). Are <a href="http://dev.mysql.com/doc/refman/5.0/en/triggers.html" rel="noreferrer">triggers</a> the only way to accomplish this in MySQL? If so, would the trigger below work?</p>
  
  <pre><code>create trigger date_check
  before insert, update on date
  for each row
  begin
  if(date IS NOT NULL) then
   SIGNAL 'date already set'
  end if ;
  end ;
  </code></pre>
  
  <p><strong>Background</strong>: I have a table with critical dates that was accidentally changed due to user error. I put some checks in the user interface to prevent this from happening again but want another layer of safety directly with the database if possible. </p>