Skip to content

feat: add UUIDs to columns#2598

Open
blizzz wants to merge 3 commits into
mainfrom
enh/column-uuids
Open

feat: add UUIDs to columns#2598
blizzz wants to merge 3 commits into
mainfrom
enh/column-uuids

Conversation

@blizzz

@blizzz blizzz commented May 13, 2026

Copy link
Copy Markdown
Member

Base for structural updates, cf. my comment in #2504 (comment)

  • Add UUIDs to Tables or consider unnecessary
  • Add UUIDs to Views or consider unnecessary
  • Add UUIDs to multiselection options
  • Treat multiselection default on export and import

@blizzz blizzz requested a review from enjeck as a code owner May 13, 2026 20:04
@blizzz blizzz added the 2. developing Work in progress label May 13, 2026
@blizzz blizzz force-pushed the enh/column-uuids branch from a7d556b to 1564e5e Compare May 13, 2026 20:10
Comment thread lib/Migration/Version2020Date20260513185340.php
Comment thread .scoper-production-dependencies Outdated
@blizzz blizzz force-pushed the enh/column-uuids branch from 1564e5e to dc4ed01 Compare May 18, 2026 20:59
@blizzz

blizzz commented May 18, 2026

Copy link
Copy Markdown
Member Author

Add UUIDs to Tables or consider unnecessary
Add UUIDs to Views or consider unnecessary

Would not implement it now as it is not required currently. If necessary for an auto-update of a table without specifying local ids, this can be always added alter on easily.

@blizzz blizzz force-pushed the enh/column-uuids branch from ae85f9f to bd52932 Compare May 28, 2026 12:18
@Koc

Koc commented May 28, 2026

Copy link
Copy Markdown
Contributor

I guess that uuid should be unique across table (we need add unique id for table_id+uuid).

Here use-cases that we need to support:

Table update between instance

  • a developer designs and evolves a table schema locally using UI
  • exports the schema
  • imports it into production
  • later changes the schema locally again
  • and wants to apply those schema updates to the already existing production table without recreating it from scratch

Table duplocation a single NC instance

A second scenario is especially important for end users who do not have separate environments:

  • a developer designs and evolves a table schema using UI
  • exports the schema
  • imports it into another table on same instance

@blizzz

blizzz commented May 28, 2026

Copy link
Copy Markdown
Member Author

I guess that uuid should be unique across table (we need add unique id for table_id+uuid).

Here use-cases that we need to support:

Table update between instance

* a developer designs and evolves a table schema locally using UI

* exports the schema

* imports it into production

* later changes the schema locally again

* and wants to apply those schema updates to the already existing production table without recreating it from scratch

Yupp, this scenario is exactly what are having in mind.

Table duplocation a single NC instance

A second scenario is especially important for end users who do not have separate environments:

* a developer designs and evolves a table schema using UI

* exports the schema

* imports it into another table on same instance

This would also be covered, as importing always requires a target table. So having columns with the same UUID across different tables is intentional. Hence importing, so the plan, would only affect the columns on the targeted table.

@enjeck enjeck force-pushed the enh/column-uuids branch from bd52932 to b43e52c Compare June 6, 2026 19:54
@blizzz blizzz force-pushed the enh/column-uuids branch from b43e52c to 8572960 Compare June 8, 2026 08:32
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@blizzz blizzz force-pushed the enh/column-uuids branch from 8572960 to 85e5210 Compare June 15, 2026 10:34

@enjeck enjeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments

Comment thread lib/Db/Column.php
Comment thread lib/Db/Column.php Outdated
Comment thread lib/Db/Column.php Outdated
Comment thread lib/Db/Column.php
Comment thread lib/Db/Column.php
'notnull' => false,
'default' => null,
'length' => 36,
'comment' => 'UUIDv7 identifier to support structural updates across instances',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so it will be nice to have a a UNIQUE index?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the idea here, only within the same table. Several users may import (and eventually update) the same table from a template or different system, then you would have the same (or similar) column rows, but associated with different tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants