EctoTablestore.Migration.add_index
You're seeing just the macro
add_index
, go back to EctoTablestore.Migration module for more information.
Adds a secondary index when creating a table.
For more information see the Chinese Docs | English Docs
Examples
create table("posts") do
add_pk(:id, :integer, partition_key: true)
add_pk(:owner_id, :string)
add_column(:title, :string)
add_column(:content, :string)
add_index("posts_owner", [:owner_id, :id], [:title, :content])
add_index("posts_title", [:title, :id], [:content])
end