Brinsley
03/14/2022, 11:39 AMCURRENT_TIMESTAMP()
function. In TypeScript I would have done this:
import { sql } from "kysely";
.addColumn("valid_since", "datetime", col => col.notNull().defaultTo(sql`CURRENT_TIMESTAMP()`))
The migration handler obviously doesn’t like the kysely import (using require
since it’s in JavaScript) giving me the error MODULE_NOT_FOUND
. Read around the docs and can’t see anything specific about migration dependencies or packaging options.
Any thoughts?Frank
kysely
in this case?thdxr
03/14/2022, 5:43 PMBrinsley
03/15/2022, 6:42 AMBrinsley
03/15/2022, 7:20 AM