Skip to content

Foreign Keys

You can enable foreign key constraints for the Native SQLite driver by enabling them in the database configuration.

NativeSqliteDriver(
  schema = Database.Schema,
  onConfiguration = { config: DatabaseConfiguration ->
    config.copy(
      extendedConfig = DatabaseConfiguration.Extended(foreignKeyConstraints = true)
    )
  }
)