title: Changing Laravel MYSQL to utf8mb4 for Emoji Support in Existing Database
body: <p>I am using <strong>Laravel 5.3</strong> and I have already set-up my production server. All DB Migrations were already created using the following database config:</p>
  
  <pre><code>'mysql' =&gt; [
              'driver' =&gt; 'mysql',
              'host' =&gt; env('DB_HOST', 'localhost'),
              'port' =&gt; env('DB_PORT', '3306'),
              'database' =&gt; env('DB_DATABASE', 'forge'),
              'username' =&gt; env('DB_USERNAME', 'forge'),
              'password' =&gt; env('DB_PASSWORD', ''),
              'charset' =&gt; 'utf8',
              'collation' =&gt; 'utf8_unicode_ci',
              'prefix' =&gt; '',
              'strict' =&gt; true,
              'engine' =&gt; null,
          ],
  </code></pre>
  
  <p>But now, some of my users had reported that they get an error when they try to save a form that has emoji  icons in them. After searching I found out that I need to set the mysql charset to <code>utf8mb4</code> for this to work so my config should have been something like this instead:</p>
  
  <pre><code>'mysql' =&gt; [
              'driver' =&gt; 'mysql',
              'host' =&gt; env('DB_HOST', 'localhost'),
              'port' =&gt; env('DB_PORT', '3306'),
              'database' =&gt; env('DB_DATABASE', 'forge'),
              'username' =&gt; env('DB_USERNAME', 'forge'),
              'password' =&gt; env('DB_PASSWORD', ''),
              'charset' =&gt; 'utf8mb4',
              'collation' =&gt; 'utf8mb4_unicode_ci',
              'prefix' =&gt; '',
              'strict' =&gt; true,
              'engine' =&gt; null,
          ],
  </code></pre>
  
  <p>Since this is in a production server, I cannot do <code>migrate:refresh</code>. So my questions are: </p>
  
  <ol>
  <li>How can I change my existing database I created using laravel migration to use <code>utf8mb4</code> instead of <code>utf8</code> and also update laravel on the same? Is there an easier way to do this?</li>
  <li>If the above is possible, am I better off setting <code>utf8mb4</code> for all tables or only use that for the 2 table columns where I will really be using emoji.</li>
  </ol>
  
  <p>Thank you for your help.</p>