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

Duplicate Enum type error when using ENUM(...) datataype in the model #31

Closed
armenhajian opened this issue Dec 15, 2020 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@armenhajian
Copy link

Error: Schema must contain uniquely named types but contains multiple types named "quiztestEnumType"

This is my model

`const Model = sequelize.define('quiz', {

    id: {
        type: DataTypes.INTEGER,
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
    },

    title: {
        type: DataTypes.STRING,
        allowNull: false,
    },

    test: {
        type: DataTypes.ENUM(['one', 'two']),
    }

}, Object.assign({}, defaultOptions));`

P.S. I don't have any other Enum type in my project.

@vincentdesmares
Copy link
Collaborator

Hi @armenhajian , I will be looking at this issue soon. Thanks for the report!

@vincentdesmares vincentdesmares self-assigned this Feb 19, 2021
@vincentdesmares vincentdesmares added the bug Something isn't working label Feb 19, 2021
@vincentdesmares
Copy link
Collaborator

It looks like this was resolved with this PR on graphql-sequelize: https://github.com/mickhansen/graphql-sequelize/pull/698/files. I tried to upgrade but it's still not working, I will try to dig into this further next week.

@vincentdesmares
Copy link
Collaborator

Closed as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants