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 column DEFAULTs in CREATE TABLE statements #553

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

andrew-farries
Copy link
Collaborator

Convert inline DEFAULT values in CREATE TABLE statements like this:

CREATE TABLE foo(a text DEFAULT 'foo')

into OpCreateTable operations like this:

[
  {
    "create_table": {
      "columns": [
        {
          "default": "'foo'",
          "name": "a",
          "nullable": true,
          "type": "text"
        }
      ],
      "name": "foo"
    }
  }
]

@andrew-farries andrew-farries marked this pull request as ready for review December 19, 2024 10:11
@andrew-farries andrew-farries force-pushed the convert-create-table-inline-check-constraints branch from 5f92000 to 5202eb9 Compare December 19, 2024 12:57
@andrew-farries andrew-farries force-pushed the convert-create-table-inline-default branch from a0d708e to de07051 Compare December 19, 2024 12:57
Base automatically changed from convert-create-table-inline-check-constraints to main December 19, 2024 13:10
@andrew-farries andrew-farries force-pushed the convert-create-table-inline-default branch from de07051 to 042257a Compare December 19, 2024 13:12
Convert inline `DEFAULT` values in `CREATE TABLE` statements like this:

```sql
CREATE TABLE foo(a text DEFAULT 'foo')
```

into `OpCreateTable` operations like this:

```json
[
  {
    "create_table": {
      "columns": [
        {
          "default": "'foo'",
          "name": "a",
          "nullable": true,
          "type": "text"
        }
      ],
      "name": "foo"
    }
  }
]
```
@andrew-farries andrew-farries force-pushed the convert-create-table-inline-default branch from 042257a to facf39f Compare December 19, 2024 13:17
@andrew-farries andrew-farries merged commit 6dd898a into main Dec 19, 2024
28 checks passed
@andrew-farries andrew-farries deleted the convert-create-table-inline-default branch December 19, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants