Tune column settings
Toggle primary key, uniqueness, and nullability on existing columns - with validation.
update_column_settings toggles a column's is_primary_key, is_unique,
and is_nullable - one column at a time. Tightening a constraint validates
existing data first; loosening one is safe.
Good to know
set_primary_key
instead - it validates the column combination, where this per-column route
rejects the first individually-non-unique column.Update
eddytor set column eddytor sales orders --column order_id --is-unique true
eddytor set column eddytor sales orders --column amount --is-nullable falseupdate_column_settings(table="eddytor.cfg_xxx.<uuid>_orders",
column="order_id", is_unique=true)To edit a column's description / tags (display metadata, not constraints), use
eddytor set field / the field-metadata tool.
Tightening validates first
Heads up
is_nullable: false rejects if any NULLs exist;
uniqueness rejects on duplicates; is_primary_key: true validates the
cumulative key - the existing key columns plus this one. Fix the data
(merge_rows) and
retry.Loosening - disabling the primary key, making a column nullable - is safe. One
exception: is_unique on a current primary-key column is rejected with
Cannot change 'isUnique' on primary-key column … unless the same request also
changes is_primary_key. The flag is derived from the key shape (single key →
unique, composite → not) - change the
key itself instead.
After changing, get_table_schema confirms the settings, and
validate_constraints checks
existing data still passes.