dolthub / dolthub/dolt

Updating a column's tag should update indexes and foreign key references

Open
#10,003 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 8h
Merged PRs (30d)
120

Description

In rare, advanced cases, customers may need to alter the internal column tag ID for a column. The Dolt CLI, or the `dolt_update_column_tag()` stored procedure both allow updating a column's tag. Index and foreign key definitions use column tags to track which columns they are associated with, and when a column tag is changed, indexes and foreign keys do not currently get updated. This can result in unexpected effects, such as an index definition being removed in a merge.

Fortunately, it is very rare that customers need to manually update a column tag. However, it is needed occasionally, so we should update the CLI and the `dolt_update_column_tag()` stored procedure so that they update index and foreign key metadata, and don't leave around invalid index or FK definitions.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the Dolt CLI and the dolt_update_column_tag() stored procedure, focusing on how they change a column tag. Check how index and foreign key definitions reference that tag. Done means both entry points update the related metadata without leaving invalid definitions, including behavior that could affect merges.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
cli, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.