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

Text default value not escaped when extracted from custom type #660

Open
paslo22 opened this issue Feb 8, 2024 · 0 comments
Open

Text default value not escaped when extracted from custom type #660

paslo22 opened this issue Feb 8, 2024 · 0 comments

Comments

@paslo22
Copy link

paslo22 commented Feb 8, 2024

Hey! We are using this lib to generate ours models and works great! But we found the following issue:

CREATE TYPE test_source AS ENUM ('first', 'second');

CREATE TABLE test
(
    whatever test_source[] DEFAULT '{first}'
);

The model created is:

whatever: {
  type: DataTypes.ARRAY(DataTypes.ENUM("first","second")),
  defaultValue: [first]
}

As far as I understand, the default value should be:

  defaultValue: ["first"]
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

No branches or pull requests

1 participant