From 0efcc2efb1926afa1f8768f0ce068c68235f8997 Mon Sep 17 00:00:00 2001 From: Jorge Chavarriaga Date: Mon, 20 Nov 2023 10:41:10 -0500 Subject: [PATCH] Revert "fix: refSerialize en la DB mysql acepta ahora null" This reverts commit 0af56de4fb79e3e76d6774ef9de6e28a0d1f6d70. --- packages/database/src/mysql/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/database/src/mysql/index.js b/packages/database/src/mysql/index.js index a5a7b4cef..09b1d6430 100644 --- a/packages/database/src/mysql/index.js +++ b/packages/database/src/mysql/index.js @@ -49,9 +49,9 @@ class MyslAdapter { save = (ctx) => { const values = [ - [ctx.ref, ctx.keyword, ctx.answer, ctx.refSerialize, ctx.from, JSON.stringify(ctx.options)], + [ctx.ref, ctx.keyword, ctx.answer, ctx.refSerialize, ctx.from, JSON.stringify(ctx.options), null], ] - const sql = 'INSERT INTO history (ref, keyword, answer, refSerialize, phone, options) values ?' + const sql = 'INSERT INTO history (ref, keyword, answer, refSerialize, phone, options, created_at) values ?' this.db.query(sql, [values], (err) => { if (err) throw err @@ -68,7 +68,7 @@ class MyslAdapter { ref varchar(255) NOT NULL, keyword varchar(255) NULL, answer longtext NOT NULL, - refSerialize varchar(255) NULL, + refSerialize varchar(255) NOT NULL, phone varchar(255) NOT NULL, options longtext NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP)