Module

x/kysely_postgrs_js_dialect/mod.ts>kysely.ColumnDefinitionBuilder#modifyEnd

Kysely dialect for PostgreSQL using the Postgres.js client.
Latest
method kysely.ColumnDefinitionBuilder.prototype.modifyEnd
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 to the end of the column definition.

Examples

db.schema.createTable('person')
 .addColumn('id', 'integer', col => col.primaryKey())
 .addColumn('age', 'integer', col => col.unsigned().notNull().modifyEnd(sql`comment ${sql.lit('it is not polite to ask a woman her age')}`))
 .execute()

The generated SQL (MySQL):

create table `person` (
  `id` integer primary key,
  `age` integer unsigned not null comment 'it is not polite to ask a woman her age'
)

Parameters

modifier: Expression<any>