Обновлена 15 сентября 2026 г. в 08:55
index_object:alter()
Параметры:
index_object(index_object) — объектoptions(table) — опции индекса (см. index_opts)
Возвращает
nil
Возможные ошибки
- индекс не существует
- индекс первичного ключа нельзя изменить на
{unique = false}
tarantool> s = box.schema.create_space('test')---...tarantool> i = s:create_index('i', {parts = {{field = 1, type = 'unsigned'}}})---...tarantool> s:insert({1, 2})---- [1, 2]...tarantool> i:select()---- - [1, 2]...tarantool> i:alter({parts = {{field = 1, type = 'unsigned'}, {field = 2, type = 'unsigned'}}})---...tarantool> s:insert({1, 't'})---- error: 'Tuple field 2 type does not match one required by operation: expected unsigned'...
tarantool> box.space.space55.index.primary:alter({type = 'HASH'})---...tarantool> box.space.vinyl_space.index.i:alter({page_size=4096})---...