Skip to content

Instantly share code, notes, and snippets.

@yusuke2255
Created February 25, 2015 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yusuke2255/c8da16c01e45ab1556db to your computer and use it in GitHub Desktop.
Save yusuke2255/c8da16c01e45ab1556db to your computer and use it in GitHub Desktop.
【メモ】Dropwizardのmigrationでカラムにcharasetを指定する ref: http://qiita.com/Kawata/items/834dce601aacbef9cc67
<?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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment