title: Rails Postgres functional indexes
body: <p>How I should enter my multicolum indexes which contain functions into schema.rb ?</p>
  
  <p>for example this DOESN'T work:</p>
  
  <pre><code>add_index "temporary_events", ["templateinfoid", "campaign", "date(gw_out_time)", "messagetype"], :name =&gt; "temporary_events_campaign_tinfoid_date_messagetype"
  </code></pre>
  
  <blockquote>
    <p>rake db:test:load</p>
    
    <p>rake aborted!</p>
    
    <p>PGError: ERROR:  column "date(gw_out_time)" does not exist</p>
    
    <p>: CREATE  INDEX "temporary_events_campaign_tinfoid_date_messagetype" ON "temporary_events" ("templateinfoid", "campaign", "date(gw_out_time", "messagetype")</p>
  </blockquote>