Answers.Body: <p>Something like this should work:</p>
  
  <pre><code>$this-&gt;alterColumn('tableName', 'columnName', "enum('existingOption1','existingOption2','newOption') NULL");
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-01T21:00:12.027Z
Answers.LastActivityDate: 2017-06-01T21:00:12.027Z
Answers.UserDisplayName: Brad Bell
Body: <p>I need to add a value to my plugin database for an ENUM field but I am struggling to find the correct syntax for the alterColumn method.</p>
  
  <p>I want to do this but with alterColumn if possible?</p>
  
  <pre><code>ALTER TABLE tableName CHANGE columnName columnName ENUM('existingOption1', 'existingOption2', 'newOption') DEFAULT NULL;
  </code></pre>
  
  <p>Cheers</p>
  
Tags: <plugin-development><migration><createcommand>
Title: How to use alterColumn to change the values of an ENUM field in a DB Migration
ThreadText: # How to use alterColumn to change the values of an ENUM field in a DB Migration
  
  (Asked by: username_0 on 2017-06-01)
  
  I need to add a value to my plugin database for an ENUM field but I am struggling to find the correct syntax for the alterColumn method.
  
  I want to do this but with alterColumn if possible?
  
  ```
  ALTER TABLE tableName CHANGE columnName columnName ENUM('existingOption1', 'existingOption2', 'newOption') DEFAULT NULL;
  
  ```
  
  Cheers
  
  **Tags:** plugin-development, migration, createcommand
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-06-01. Score: 0 | Accepted answer
  
  Something like this should work:
  
  ```
  $this->alterColumn('tableName', 'columnName', "enum('existingOption1','existingOption2','newOption') NULL");
  
  ```
  
  
  ---
  
  