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 DROP NOT NULL SQL to pgroll operation #505

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

andrew-farries
Copy link
Collaborator

Update the sql2pgroll package to convert SQL like:

ALTER TABLE foo ALTER COLUMN a DROP NOT NULL

to the equivalent pgroll operation:

[
  {
    "alter_column": {
      "column": "a",
      "down": "TODO: Implement SQL data migration",
      "nullable": true,
      "table": "foo",
      "up": "TODO: Implement SQL data migration"
    }
  }
]

@andrew-farries andrew-farries marked this pull request as ready for review December 3, 2024 09:57
@andrew-farries andrew-farries force-pushed the sql2pgroll-drop-not-null branch from b8baa74 to 12d78c0 Compare December 3, 2024 11:28
Base automatically changed from add-sql2pgroll-package to main December 3, 2024 11:29
Convert SQL like:

```sql
ALTER TABLE foo ALTER COLUMN a DROP NOT NULL
```

to the equivalent `pgroll` operation:

```json
[
  {
    "alter_column": {
      "column": "a",
      "down": "TODO: Implement SQL data migration",
      "nullable": true,
      "table": "foo",
      "up": "TODO: Implement SQL data migration"
    }
  }
]
```
@andrew-farries andrew-farries force-pushed the sql2pgroll-drop-not-null branch from 12d78c0 to 4b37c76 Compare December 3, 2024 11:30
@andrew-farries andrew-farries merged commit 84661eb into main Dec 3, 2024
27 checks passed
@andrew-farries andrew-farries deleted the sql2pgroll-drop-not-null branch December 3, 2024 11:43
@andrew-farries andrew-farries added the sql2pgroll Issues relating to the sql2pgroll package label Dec 4, 2024
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