Error: WARN_DATA_TRUNCATED: Data truncated for column 'group_type' at row 1

Error: WARN_DATA_TRUNCATED: Data truncated for column 'group_type' at row 1
[0]     at Query.Sequence._packetToError (F:\interview\news-feed\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14)
[0]     at Query.ErrorPacket (F:\interview\news-feed\node_modules\mysql\lib\protocol\sequences\Query.js:79:18)
[0]     at Protocol._parsePacket (F:\interview\news-feed\node_modules\mysql\lib\protocol\Protocol.js:291:23)
[0]     at Parser._parsePacket (F:\interview\news-feed\node_modules\mysql\lib\protocol\Parser.js:433:10)
[0]     at Parser.write (F:\interview\news-feed\node_modules\mysql\lib\protocol\Parser.js:43:10)
[0]     at Protocol.write (F:\interview\news-feed\node_modules\mysql\lib\protocol\Protocol.js:38:16)
[0]     at Socket.<anonymous> (F:\interview\news-feed\node_modules\mysql\lib\Connection.js:88:28)
[0]     at Socket.<anonymous> (F:\interview\news-feed\node_modules\mysql\lib\Connection.js:526:10)
[0]     at Socket.emit (events.js:223:5)
[0]     at addChunk (_stream_readable.js:309:12)
[0]     at readableAddChunk (_stream_readable.js:290:11)
[0]     at Socket.Readable.push (_stream_readable.js:224:10)
[0]     at TCP.onStreamRead (internal/stream_base_commons.js:181:23)
[0]     at Protocol._enqueue (F:\interview\news-feed\node_modules\mysql\lib\protocol\Protocol.js:144:48)
[0]     at Connection.query (F:\interview\news-feed\node_modules\mysql\lib\Connection.js:198:25)
[0]     at F:\interview\news-feed\server\node_modules\knex\lib\dialects\mysql\index.js:154:18
[0] From previous event:
[0]     at Client_MySQL._query (F:\interview\news-feed\server\node_modules\knex\lib\dialects\mysql\index.js:148:12)
[0]     at Client_MySQL.query (F:\interview\news-feed\server\node_modules\knex\lib\client.js:202:17)
[0]     at Runner.<anonymous> (F:\interview\news-feed\server\node_modules\knex\lib\runner.js:146:36)
[0] From previous event:
[0]     at F:\interview\news-feed\server\node_modules\knex\lib\runner.js:48:21
[0]     at processImmediate (internal/timers.js:439:21)
[0] From previous event:
[0]     at Runner.run (F:\interview\news-feed\server\node_modules\knex\lib\runner.js:34:31)
[0]     at Builder.Target.then (F:\interview\news-feed\server\node_modules\knex\lib\interface.js:20:43) {
[0]   code: 'WARN_DATA_TRUNCATED',
[0]   errno: 1265,
[0]   sqlMessage: "Data truncated for column 'group_type' at row 1",
[0]   sqlState: '01000',
[0]   index: 0,
[0]   sql: "insert into `groups` (`created_at`, `group_type`, `member_id`, `member_type`, `title`, `updated_at`) values ('2020-03-04 22:14:51', 'GROUP PRIVATE', 1, 'ADMIN', 'Group 1', '2020-03-04 22:14:51')"

can you please share some more details; what were you trying to do and what is the code snippet?

2 Likes