title: rails migration: postgresql for md5 of random string as default
body: <p>Rails 3 + postgresql</p>
  
  <p>I want to have a sha of a random string for a default value of a column. </p>
  
  <p>So, in my migration I have:</p>
  
  <p><code>t.string :uniqueid, default: md5(random()::text)</code></p>
  
  <p>However i can not get this to actually produce anything, I've used backticks, quotes,etc. From examples that I've seen it seems like that pg function only works in a <code>SELECT</code> statement.</p>
  
  <p>Is that accurate? Any ideas on how I could achieve this? </p>
  
  <p>Thanks</p>