Builder to specify the schema of a table index.




dirty: boolean = false

True if the schema has been modified since created/loaded.

existsInSchema: boolean = false

True if this resource exists, in some form, in the schema.

fields: Set<string> = ...

The fields included in the index.

name: string

The name of the schema item.

originalFromSchema?: IndexBuilder

If the resource exists in the schema, the unaltered values it has.

parent: TableBuilder

The table this index belongs to.

removedFields: Set<string> = ...

Fields to remove from the index.

shouldBePrimary: boolean = false

True if this is a primary key index.

shouldBeUnique: boolean = false

True if this is a unique index.

shouldDrop: "yes" | "exists" | "no" = 'no'

Whether or not the schema item should be dropped.

  • exists - drop if exists
shouldRenameTo?: string

The name the schema item should have if renaming.

shouldSkipIfExists: boolean = false

If true, apply IF NOT EXISTS syntax.