Add primary key to schema_history #13611
Labels
area/offloading
Node status offloading
area/workflow-archive
good first issue
Good for newcomers
solution/suggested
A solution to the bug has been suggested. Someone needs to implement it.
type/feature
Feature request
Summary
It would be good to have a primary key in the creation statement for the schema_history table.
Use Cases
DB replication mechanisms and integrity-checking mechanisms sometimes rely on the ability to identify a single row. Primary keys are made for this.
I bumped into this while using a percona-xtradb database deployed with the Percona Operator (which isn't too uncommon, I had it running in the cluster for another db already, so re-used it for the argo database), which will deny the creation of this table with the default configuration:
While it might feel like it adds no value to the argo-workflows project, this is a minor change, won't affect anything else, but will allow users to deploy argo easier. I might add a PR if this would be allowed.
The changes would go in migrate.go, where the creation would get a
primary key(schema_version)
and an additional migration line in the big set which would do an alter-add-primary-key statement to try and add the primary key to an already existing table.Message from the maintainers:
Love this feature request? Give it a 👍. We prioritise the proposals with the most 👍.
The text was updated successfully, but these errors were encountered: