mysql CURRENT_TIMESTAMP not support

Aperta
#254 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@huydo862003 ci sta già lavorando.

Dal 6/11/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

question

I use this def:

Table group_log  {
        id int  [pk, not null, increment]
        add_time timestamp  [not null, default: `CURRENT_TIMESTAMP`]
}

create this SQL for mysql:

CREATE TABLE `group_log` (
  `id` bigint PRIMARY KEY NOT NULL AUTO_INCREMENT,
  `add_time` timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP),
);

get this error:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(CURRENT_TIMESTAMP),
)' at line 3

try with this:

default: `CURRENT_TIMESTAMP`

generate this: add_time timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP()), also not work for MYSQL

Lingua principale
JavaScript
Stelle
3.7k
Fork
233
Merge medio
2g 4h
PR unite (30g)
23

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di holistics/dbml

Tutte le issue di holistics/dbml

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.