mirror of
https://github.com/magicbug/Cloudlog
synced 2026-08-13 17:49:35 -04:00
Bump migration_version to 263 and add Migration_notes_utf8mb4_columns. The new migration converts the notes table to use utf8mb4 with utf8mb4_unicode_ci to support emoji and other 4-byte characters; down() reverts the table back to utf8 with utf8_general_ci.
20 lines
518 B
PHP
20 lines
518 B
PHP
<?php
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
/*
|
|
* Convert notes table columns to utf8mb4 to support emoji and other 4-byte characters
|
|
*/
|
|
|
|
class Migration_notes_utf8mb4_columns extends CI_Migration {
|
|
|
|
public function up()
|
|
{
|
|
$this->db->query("ALTER TABLE notes CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;");
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->db->query("ALTER TABLE notes CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;");
|
|
}
|
|
}
|