Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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
Re-export
import { kysely } from "https://deno.land/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 CreateTableBuilder.addForeignKeyConstraint method instead.

Examples

col.references('person.id').onDelete('cascade')