[MDEV-26934] ADD SYSTEM VERSIONING and modify column WITHOUT SYSTEM VERSIONING in single ALTER TABLE command Created: 2021-10-28 Updated: 2021-11-23 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table, Versioned Tables |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Aleksey Midenkov |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
It does not currently seem possible to use a single ALTER TABLE statement to add system versioning to a table and exclude columns from system versioning. For example, try running the following statements:
This produces the following output:
The workaround is to use multiple ALTER TABLE statements:
|
| Comments |
| Comment by Nikita Malyavin [ 2021-11-09 ] | ||||||||||||
|
I remember | ||||||||||||
| Comment by Nikita Malyavin [ 2021-11-09 ] | ||||||||||||
|
midenok However it is possible to add a key:
another example:
We can refer to the changes from alter table. I think it is affordable to refer to a new versioning state of the table in CHANGE clause as well. | ||||||||||||
| Comment by Aleksey Midenkov [ 2021-11-23 ] | ||||||||||||
|
That didn't work by design. As a new feature would be nice to have it. Should be implemented with MDEV-26993. |