We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
defaultNow()
drizzle-orm
0.28.5
drizzle-kit
0.19.13
Syntax error while executing drizzle-kit push:mysql with schema below.
drizzle-kit push:mysql
export const users = mysqlTable('users', { id: serial('id').primaryKey(), joined_at: timestamp('joined_at', { mode: 'date', fsp: 0 }).notNull().defaultNow() });
Here is full sql error:
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 '(now()),
This syntax error occurs when using defaultNow() in schema. It generates incorrect sql (now()) that causes the error.
(now())
deafultNow() in schema should have generated now() instead of (now()).
deafultNow()
now()
The text was updated successfully, but these errors were encountered:
I'll close this one in favor of #921. It will be fixed by #1114
Sorry, something went wrong.
No branches or pull requests
What version of
drizzle-orm
are you using?0.28.5
What version of
drizzle-kit
are you using?0.19.13
Describe the Bug
Syntax error while executing
drizzle-kit push:mysql
with schema below.Here is full sql error:
This syntax error occurs when using
defaultNow()
in schema. It generates incorrect sql(now())
that causes the error.Expected behavior
deafultNow()
in schema should have generatednow()
instead of(now())
.Environment & setup
The text was updated successfully, but these errors were encountered: