Reading Kysely documentation I noticed they suggest using Insertable, Selectable, and Updatable wrappers.
export interface PetTable {
id: Generated<number>
name: string
owner_id: number
species: 'dog' | 'cat'
}
// You should not use the table schema interfaces directly. Instead, you should
// use the `Selectable`, `Insertable` and `Updateable` wrappers. These wrappers
// make sure that the correct types are used in each operation.
export type Pet = Selectable<PetTable>
export type NewPet = Insertable<PetTable>
export type PetUpdate = Updateable<PetTable>
Reading Kysely documentation I noticed they suggest using Insertable, Selectable, and Updatable wrappers.
It'll be nice if they'll be generated too.