Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/kysely_postgrs_js_dialect/deps.ts>kysely.SchemaModule#createType

Kysely dialect for PostgreSQL using the Postgres.js client.
Latest
method kysely.SchemaModule.prototype.createType
Re-export
import { kysely } from "https://deno.land/x/kysely_postgrs_js_dialect@v0.27.4/deps.ts";
const { SchemaModule } = kysely;

Create a new type.

Only some dialects like PostgreSQL have user-defined types.

Examples

await db.schema
  .createType('species')
  .asEnum(['dog', 'cat', 'frog'])
  .execute()

Parameters

typeName: string