Module

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

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

Adds a primary key constraint for one or more columns.

The constraint name can be anything you want, but it must be unique across the whole database.

Examples

addPrimaryKeyConstraint('primary_key', ['first_name', 'last_name'])

Parameters

constraintName: string
columns: C[]