Liquibase插入BIT列,MySQL,数据太长而无法进入列
在 Liquibase 中,我定义了一个表,其列类型为 BIT(1)
<changeSet author="foobar" id="create-configuration-table">
<createTable tableName="configuration">
<column autoIncrement="true" name="id" type="BIGINT(19)">
<constraints primaryKey="true" />
</column>
<column name="active" type="BIT(1)" />
<column name="version" type="INT(10)" />
</createTable>
</changeSet>
在随后的变更集中,我想将数据插入到此表中,但是,将数据插入BIT(1)类型的“活动”列时,MySQL会抱怨“数据截断:数据对于列来说太长了”
我试过:
<insert>
<column name="active" value="1" type="BIT(1)" />
</insert>
和
<insert>
<column name="active" value="1"/>
</insert>
和
<insert>
<column name="active" value="TRUE" type="BOOLEAN"/>
</insert>
插入 BIT(1) 列的正确方法是什么?