Module

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

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

Adds an on delete constraint for the foreign key 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').onDelete('cascade')