Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mudar colunas de texto para utf8mb4 #36

Open
guaycuru opened this issue Aug 1, 2018 · 0 comments
Open

Mudar colunas de texto para utf8mb4 #36

guaycuru opened this issue Aug 1, 2018 · 0 comments
Assignees
Milestone

Comments

@guaycuru
Copy link
Owner

guaycuru commented Aug 1, 2018

Para suportar unicode de 4 bytes, como emojis.
Para isso, todas as tabelas e colunas de texto precisam ser alteradas, bem como as configurações de conexão em doctrine.inc.php:

$connection = array(
	'driver' => CONFIG_DB_DRIVER,
	'user' => CONFIG_DB_USER,
	'password' => CONFIG_DB_PASS,
	'dbname' => CONFIG_DB_NAME,
	'charset' => 'utf8mb4'
);
if(CONFIG_DB_DRIVER == 'mysql_pdo') {
	$connection['driverOptions'] = array(
		// ToDo: Remover a mudanca do SQL Mode
		PDO::MYSQL_ATTR_INIT_COMMAND => 'SET sql_mode=(SELECT REPLACE(@@sql_mode,\'ONLY_FULL_GROUP_BY\',\'\')), NAMES utf8mb4'
	);
} else {
	$connection['driverOptions'] = array(
		// ToDo: Remover a mudanca do SQL Mode
		PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'
	);
}
@guaycuru guaycuru added this to the v2.6 milestone Aug 1, 2018
@guaycuru guaycuru self-assigned this Aug 1, 2018
@guaycuru guaycuru modified the milestones: v2.6, v2.7 Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant