Module

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

Kysely dialect for PostgreSQL using the Postgres.js client.
Latest
method kysely.ColumnDefinitionBuilder.prototype.references
import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.4/mod.ts";
const { ColumnDefinitionBuilder } = kysely;

Adds a foreign key constraint for the column.

If your database engine doesn't support foreign key constraints in the column definition (like MySQL 5) you need to call the table level {@link CreateTableBuilder.addForeignKeyConstraint} method instead.

Examples

col.references('person.id')

Parameters

ref: string