icode-mcp-adapter 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icode-mcp-adapter",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Dynamic MCP server adapter — auto-generates CRUD tools from schema configs. Plugs into icode-server via Fastify or runs standalone.",
5
5
  "type": "module",
6
6
  "main": "src/engine/McpEngine.js",
@@ -192,11 +192,12 @@ function regAdd(server, db, table, display, owner) {
192
192
  const insertVals = [];
193
193
  const placeholders = [];
194
194
 
195
- // Auto-set columns (_created)
195
+ // Auto-set _created — epoch ms for a bigint column, a Date for a datetime column
196
+ // (mysql2 serializes a Date to the column's expected 'YYYY-MM-DD HH:MM:SS').
196
197
  for (const c of table.columns) {
197
198
  if (c.autoSet === 'created_at') {
198
199
  insertCols.push(q(c.name));
199
- insertVals.push(Date.now());
200
+ insertVals.push(c.type === 'timestamp' ? Date.now() : new Date());
200
201
  placeholders.push('?');
201
202
  }
202
203
  }