WhyDoThis
pg migration raw sql CREATE FUNCTION gets error: "TypeError: Cannot redefine property: then"
When I try:
in my migration "up" I get "✖ Migration failed with TypeError: Cannot redefine property: then" when migrating latest.
When I try the same in pgadmin it works no issue. Any ideas/suggestions?
4 replies
Updateable primary key question & .set() type safety
Do you all wrap your Updateable versions of tables to omit id? Or am I doing something unconventional here.
Also how do you get typesafety on set() calls to prevent it accepting an item with id (or whatever primary key) from being updated?
13 replies
Is there an easy tool to convert my existing knex migrations to kysely migrations?
I have a bunch of knex migrations in following format:
Copilot can't seem to do this for me so wondering if anyone knows of a tool? Maybe the only way is by hand.
25 replies
What am I not understanding about ColumnType?
(Apologize if this is very nooby I am new to kysely as of today)
Used kysely-codegen and it spit out something like the following:
(Maybe it shouldn't be Generated? My current thought is code-gen marks that because the column has a default value? I'm struggling to find in kysely docs clear right/wrong here.)
Which I then wrap:
However when I go to use like so:
I get compilation error:
----------------
If I understand how codegen set up Int8 correctly with ColumnType then it passed as the InsertType (middle arg). So I wouldn't expect this to error - what am I missing here?
3 replies