小编Jef*_*ton的帖子

liquibase 没有创建未签名的列

我的环境:

  • java: 1.8.0_20, 64 位
  • liquibase:3.3.1
  • mysql: 5.5.34
  • mysql 连接器:mysql-connector-java-5.1.34-bin.jar
  • mysql 驱动程序:com.mysql.jdbc.Driver
  • mysql 连接字符串:jdbc:mysql://localhost/my_db
  • mysql用户:root用户
  • 操作系统:Windows 7 64

数据库更改日志 xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" 
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">

<changeSet author="jbenton" id="create my_test_tbl table">
   <sql> SET storage_engine=MYISAM; </sql>
    <createTable tableName="my_test_tbl">
        <column autoIncrement="true" name="my_test_tbl_id" type="INT UNSIGNED">
            <constraints primaryKey="true"/>
        </column>
        <column defaultValueNumeric="0" name="col_smallint" type="SMALLINT">
            <constraints nullable="false"/>
        </column>
        <column defaultValueNumeric="0" name="col_smallint_unsigned" type="SMALLINT UNSIGNED"/>
        <column defaultValueNumeric="0" name="col_smallint_unsigned_not_null" type="SMALLINT UNSIGNED">
            <constraints nullable="false"/>
        </column>
    </createTable>
</changeSet>
</databaseChangeLog>
Run Code Online (Sandbox Code Playgroud)

使用该updateSql命令,我看到正在生成以下sql

CREATE TABLE my_db.my_test_tbl …
Run Code Online (Sandbox Code Playgroud)

mysql liquibase

5
推荐指数
1
解决办法
2753
查看次数

标签 统计

liquibase ×1

mysql ×1