# Class ForeignKeyBuilder

- Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/foreign-keys.d.ts:11

##### Index

### Constructors

constructor

### Properties

_
[entityKind]

### Methods

onDelete
onUpdate

## Constructors

### constructor

- new ForeignKeyBuilder(
  config: () => {
  columns: SQLiteColumn<ColumnBaseConfig<ColumnDataType, string>, {}, {}>[];
  foreignColumns: SQLiteColumn<
  ColumnBaseConfig<ColumnDataType, string>,
  {},
  {},
  >[];
  name?: string;
  },
  actions?: { onDelete?: UpdateDeleteAction; onUpdate?: UpdateDeleteAction },
  ): ForeignKeyBuilder

  #### Parameters

  - config: () => {
    columns: SQLiteColumn<ColumnBaseConfig<ColumnDataType, string>, {}, {}>[];
    foreignColumns: SQLiteColumn<
    ColumnBaseConfig<ColumnDataType, string>,
    {},
    {},
    >[];
    name?: string;
    }
  - `Optional` actions: { onDelete?: UpdateDeleteAction; onUpdate?: UpdateDeleteAction }

  #### Returns ForeignKeyBuilder

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/foreign-keys.d.ts:17

## Properties

### _

_: { brand: "SQLiteForeignKeyBuilder"; foreignTableName: "TForeignTableName" }

- Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/foreign-keys.d.ts:13

### `Static` `Readonly`[entityKind]

"[entityKind]": string

- Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/foreign-keys.d.ts:12

## Methods

### onDelete

- onDelete(action: UpdateDeleteAction): this

  #### Parameters

  - action: UpdateDeleteAction

  #### Returns this

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/foreign-keys.d.ts:26

### onUpdate

- onUpdate(action: UpdateDeleteAction): this

  #### Parameters

  - action: UpdateDeleteAction

  #### Returns this

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/foreign-keys.d.ts:25