kysely
kysely copied to clipboard
Add an AlterTypeBuilder
There doesn't seem to be a way to alter a type after creating it without using raw sql. The following worked fine in a migration for me but it would be nice if there was a way to do it without raw sql. Happy enough if the answer is that it's more work to support than it's worth as the sql is simple enough but wanted to file an issue since I couldn't find anything related to this.
export async function up(db: Kysely<any>): Promise<void> {
await sql`alter type status add value 'down'`.execute(db)
}
Thanks! Really loving Kysely.
Hey! I'd like to tackle this one. Any recommendations on where to start?
Hey! Probably the best way to get started is to copy paste one of the existing alter builders like AlterColumnBuilder or AlterTableBuilder and go from there.