概要
createtable時にcharasetを指定するには?
migrationファイル
SQLタグでALTER TABLE文を書いてあげる
元ネタのstackoverflow
Liquibase: How to set Charset UTF-8 on MySQL database tables?
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd">
<changeSet id="1" author="y.hoge">
<createTable tableName="hoges">
<column name="id" type="int(11)" autoIncrement="true">
<constraints primaryKey="true" nullable="false" />
</column>
<column name="message_text" type="text">
<constraints nullable="false" />
</column>
</createTable>
<sql>ALTER TABLE hoges MODIFY hoge_text text CHARACTER SET utf8
COLLATE utf8_unicode_ci;
</sql>
</changeSet>
</databaseChangeLog>
なんだかなぁ