Closed Mathieu-R closed 3 months ago
Hi !
Using Kysely 0.27.3 , I have the following error when using the sql function:
0.27.3
sql
<statement expected> got .... instead
with ... is the string I pass between the backticks to the sql function.
For example, running a migration and trying to set a default value for a created_at column:
created_at
await db.schema .createTable('users') // other columns definition // ... .addColumn('created_at', 'timestamp', (col) => col.notNull().defaultTo(sql`CURRENT_TIMESTAMP`)) .execute()
The error is then <statement expected> got 'CURRENT_TIMESTAMP' instead.
<statement expected> got 'CURRENT_TIMESTAMP' instead
Note that despite my editor crying this error, the migration is still running correctly though.
Hi !
Using Kysely
0.27.3
, I have the following error when using thesql
function:with ... is the string I pass between the backticks to the sql function.
For example, running a migration and trying to set a default value for a
created_at
column:The error is then
<statement expected> got 'CURRENT_TIMESTAMP' instead
.Note that despite my editor crying this error, the migration is still running correctly though.