| 47 | } |
| 48 | |
| 49 | func logTablesWithTruncation(logger zerolog.Logger, tables map[string]bool) { |
| 50 | if len(tables) == 0 { |
| 51 | return |
| 52 | } |
| 53 | keys := maps.Keys(tables) |
| 54 | for k := range tables { |
| 55 | keys = append(keys, k) |
| 56 | } |
| 57 | logger.Warn().Strs("tables", keys).Msg("tables contain a value in a primary key that is longer than what is supported by MySQL. only the first 191 characters will be included in the index. To see the complete record enable debug logs using `--log-level debug`") |
| 58 | } |
| 59 | |
| 60 | func (c *Client) writeResources(ctx context.Context, overwrite bool, table *schema.Table, msgs message.WriteInserts) error { |
| 61 | tablesWithTruncation := make(map[string]bool) |