title: How to generate a model with a enum type field?
body: <p>I want to generate a model and the corresponding database table in Rails using the generator script. The database table has a field with "enum" type. How can I generate it?</p>
  
  <p>The table’s definition in SQL:</p>
  
  <pre class="lang-sql prettyprint-override"><code>create table works {
    id int unsigned not null auto_increment,
    nickname varchar(20) not null,
    sex enum('m', 'f') not null
  };
  </code></pre>
  
  <p>The Rails generator command:</p>
  
  <pre class="lang-sh prettyprint-override"><code>script/generator work nickname:string sex:(what should I write here?)
  </code></pre>