Skip to content

Commit

Permalink
Revert "fix: refSerialize en la DB mysql acepta ahora null"
Browse files Browse the repository at this point in the history
This reverts commit 0af56de.
  • Loading branch information
Jorge Chavarriaga committed Nov 20, 2023
1 parent 0af56de commit 0efcc2e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/database/src/mysql/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 0efcc2e

Please sign in to comment.