Skip to content
This repository has been archived by the owner on Mar 31, 2018. It is now read-only.

Ensure DB set up correctly to use configured charset (which should be utf8mb4) #227

Open
zpchavez opened this issue Aug 10, 2015 · 0 comments

Comments

@zpchavez
Copy link
Contributor

This wasn't working on another project. The fix specified below did the trick.

Acceptance Criteria

  1. DB should be able to input and output anything you can throw at it.

Tasks

  1. Set up a service provider that does this
$charset = $app['config']->load('db')['charset'];

$app['db']->query("set names {$charset}", DbAdapter::QUERY_MODE_EXECUTE);
$app['db']->query("set character_set_client={$charset}", DbAdapter::QUERY_MODE_EXECUTE);
$app['db']->query("set character_set_connection={$charset}", DbAdapter::QUERY_MODE_EXECUTE);
$app['db']->query("set character_set_results={$charset}", DbAdapter::QUERY_MODE_EXECUTE);
$app['db']->query("set character_set_server={$charset}", DbAdapter::QUERY_MODE_EXECUTE);

Additional Notes

@zpchavez zpchavez added this to the Sprint ∞ milestone Aug 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant