Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement alterColumn with expressionGenerated #1293

Open
lbguilherme opened this issue Oct 30, 2024 · 0 comments · May be fixed by #1305
Open

Implement alterColumn with expressionGenerated #1293

lbguilherme opened this issue Oct 30, 2024 · 0 comments · May be fixed by #1305
Labels
c: feature Request for new feature help wanted Extra attention is needed

Comments

@lbguilherme
Copy link

lbguilherme commented Oct 30, 2024

Description

Since PG17 it is possible to update the generated expression of a column. It should be supported on alterColumn.

https://www.postgresql.org/docs/17/sql-altertable.html

Suggested solution

pgm.alterColumn("tab", "col1", { expressionGenerated: "other + 1" });
pgm.alterColumn("tab", "col2", { expressionGenerated: null });

generates:

ALTER TABLE tab ALTER COLUMN col1 SET EXPRESSION AS (other + 1);
ALTER TABLE tab ALTER COLUMN col2 DROP EXPRESSION;

Alternative

No response

Additional context

No response

@lbguilherme lbguilherme added the s: pending triage Pending Triage label Oct 30, 2024
@Shinigami92 Shinigami92 added c: feature Request for new feature help wanted Extra attention is needed and removed s: pending triage Pending Triage labels Oct 30, 2024
@CodeYHJ CodeYHJ linked a pull request Jan 5, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants