Module

x/kysely_postgrs_js_dialect/deps.ts>kysely.CreateTableBuilder#modifyEnd

Kysely dialect for PostgreSQL using the Postgres.js client.
method kysely.CreateTableBuilder.prototype.modifyEnd
import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.3/deps.ts";
const { CreateTableBuilder } = kysely;

This can be used to add any additional SQL to the end of the query.

Also see {@link onCommit}.

Examples

db.schema.createTable('person')
  .addColumn('id', 'integer', col => col => primaryKey())
  .addColumn('first_name', 'varchar(64)', col => col.notNull())
  .addColumn('last_name', 'varchar(64), col => col.notNull())
  .modifyEnd(sql`collate utf8_unicode_ci`)
  .execute()

The generated SQL (MySQL):

create table `person` (
  `id` integer primary key,
  `first_name` varchar(64) not null,
  `last_name` varchar(64) not null
) collate utf8_unicode_ci

Parameters

modifier: Expression<any>