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

Convert RENAME COLUMN to pgroll operation #511

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

andrew-farries
Copy link
Collaborator

@andrew-farries andrew-farries commented Dec 5, 2024

Convert SQL statements of the form:

ALTER TABLE foo RENAME COLUMN a TO b
ALTER TABLE foo RENAME a TO b

to the equivalent OpAlterColumn operation:

[
  {
    "alter_column": {
      "table": "foo",
      "column": "a",
      "name": "b"
    }
  }
]

Part of #504

Convert SQL statements of the form:

```sql
ALTER TABLE foo RENAME COLUMN a TO b
ALTER TABLE foo RENAME a TO b
```

to the equivalent `OpAlterColumn` operation:

```json
[
  {
    "alter_column": {
      "table": "foo",
      "column": "a",
      "name": "b"
    }
  }
]
```
@andrew-farries andrew-farries added the sql2pgroll Issues relating to the sql2pgroll package label Dec 5, 2024
@andrew-farries andrew-farries marked this pull request as ready for review December 5, 2024 08:02
@andrew-farries andrew-farries merged commit d94d3b4 into main Dec 5, 2024
27 checks passed
@andrew-farries andrew-farries deleted the sql2pgroll-alter-column-rename branch December 5, 2024 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sql2pgroll Issues relating to the sql2pgroll package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants