• Blog
  • Changelog
  • Follow us on GitHubFollow us on XJoin our Discord server
  • Blog
  • GitHub
  • Releases
  • Getting Started

    • Quickstart
  • Library

    • Result
    • Type
    • Dependency Injection
    • Conventions
  • Local-First

    • How It Works
    • Indexes
    • Migrations
    • Patterns
    • Time travel
    • Examples
  • Other

    • API Reference
    • Comparison
    • Showcase
    • FAQ
    • Changelog

API Reference / @evolu/common / Evolu/Internal / createIndex

Variable: createIndex()

const createIndex: (indexName) => CreateIndexBuilder;

Defined in: packages/common/src/Evolu/Kysely.ts:22

Create a new index.

Examples

await db.schema
  .createIndex('person_full_name_unique_index')
  .on('person')
  .columns(['first_name', 'last_name'])
  .execute()

Parameters

ParameterType
indexNamestring

Returns

CreateIndexBuilder

Was this page helpful?

© Copyright 2025. All rights reserved.

Follow us on GitHubFollow us on XJoin our Discord server