import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.4/mod.ts";
const { ColumnDefinitionBuilder } = kysely;
This can be used to add any additional SQL right after the column's data type.
Examples
db.schema.createTable('person')
.addColumn('id', 'integer', col => col.primaryKey())
.addColumn('first_name', 'varchar(36)', col => col.modifyFront(sql`collate utf8mb4_general_ci`).notNull())
.execute()
The generated SQL (MySQL):
create table `person` (
`id` integer primary key,
`first_name` varchar(36) collate utf8mb4_general_ci not null
)
Parameters
modifier: Expression<any>