Closed dsmits32 closed 5 months ago
The following code will generate an error (invalid column data type "timestamp with time zone") when using the latest version, 0.27.3.
const { Kysely, sql, PostgresAdapter, DummyDriver, PostgresIntrospector, PostgresQueryCompiler } = require('kysely'); const db = new Kysely({ dialect: { createAdapter: () => new PostgresAdapter(), createDriver: () => new DummyDriver(), createIntrospector: (db) => new PostgresIntrospector(db), createQueryCompiler: () => new PostgresQueryCompiler(), }}) const query = db.schema.alterTable('users').addColumn('registerDate', 'timestamp with time zone'); console.log(query.compile().sql);
When using the previous version (0.27.2), this code will work.
Hey 👋
If the data type is not in the list, you should use sql template tag.
sql
duplicate of #908.
Thank you very much for your prompt and clear reply. It is greatly appreciated.
The following code will generate an error (invalid column data type "timestamp with time zone") when using the latest version, 0.27.3.
When using the previous version (0.27.2), this code will work.