mio Liquibase
di modifiche assomigliaLiquibase: come impostare Charset UTF-8 sulle tabelle del database MySQL?
<changeSet id="05192014.1525" author="h2">
<createTable tableName="network">
<column name="network_id" type="BIGINT(19) UNSIGNED">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(300)">
<constraints nullable="false"/>
</column>
<column name="active" type="TINYINT(1)" defaultValue="1">
<constraints nullable="false"/>
</column>
<column name="created_at" type="TIMESTAMP" defaultValueComputed="CURRENT_TIMESTAMP">
<constraints nullable="false"/>
</column>
<column name="created_by" type="VARCHAR(100)"/>
<column name="updated_at" type="TIMESTAMP"/>
<column name="updated_by" type="VARCHAR(100)"/>
</createTable>
</changeSet>
- ho integrato liquibase con
Maven
utilizzando plugin di - Quando eseguo
mvn clean install
, creaMySQL
tavolo come
CREATE TABLE
network
(network_id
bigint (19) non firmato NOT NULL,name
varchar (300) NOT NULL,active
tinyint (1) Default NOT NULL '1',created_at
timestamp NOT NULL DI DEFAULT CURRENT_TIMESTAMP,
created_by
varchar (100) DI DEFAULT NULL,updated_at
timestamp NULL DI DEFAULT NULL,updated_by
varchar (100) DEFAULT NULL, PRIMARY KEY (network_id
)) ENGINE = InnoDB DEFAULT CHARSET = latin1;
Tutto sembra buono, tranne CHARSET=latin1
Domanda
Come posso fare CHARSET=UTF-8
?
Hai provato a [forza sostituire] (http://www.liquibase.org/documentation/modify_sql.html) al valore richiesto? –