I am trying to insert a value into mysql using a liquibase script:
<changeSet author="liquibase" id="6225">
<insert tableName="master">
<column name="id" value="7"/>
<column name="insightname" value="topic_modelling"/>
<column name="insighttype" value="1" valueBoolean="true"/>
</insert>
</changeSet>
But when I try this it gives me the error:
Error: Data truncation: Data too long for column 'insighttype' at row 1 [Failed SQL: INSERT INTO db.master (id, insightname, insighttype) VALUES ('7', 'topic_modelling', '1')]
Is it because the value are passed with quotes? What is the solution?
My Create table statement looks like:
CREATE TABLE ss_insightmaster (
id int(11) NOT NULL AUTO_INCREMENT,
insightname varchar(255) NOT NULL,
enabled tinyint(1) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
SHOW CREATE TABLE db.master
to be sure we're understanding the types right? – danblack