Skip to content

Do not require parenthesis ( ) in up/down functions #473

@exekias

Description

@exekias

This migration fails cause the up function is not using (), let's make it optional so it's less error-prone:

[
  {
    "add_column": {
      "table": "posts",
      "column": {
        "name": "userFullName",
        "type": "text",
        "nullable": false
      },
      "up": "select \"fullName\" from users where users.id = userId"
    }
  }
]

We should double-check that this change doesn't affect existing migrations or other simpler definitions like a column or static value.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions