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

MySQL Column Info Error #125

Open
simone-frontdev opened this issue Sep 2, 2022 · 2 comments
Open

MySQL Column Info Error #125

simone-frontdev opened this issue Sep 2, 2022 · 2 comments

Comments

@simone-frontdev
Copy link

Hi,
when i try to do columnInfo() for a table its throw a errror like this:

const result = await inspector.columnInfo('posts')
console.log(result)

(node:19210) UnhandledPromiseRejectionWarning: Error: ER_BAD_FIELD_ERROR: Unknown column 'c.GENERATION_EXPRESSION' in 'field list'
    at Query.Sequence._packetToError (/Users/simonedellefave/Personal/react-express-crud-generator/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
    at Query.ErrorPacket (/Users/simonedellefave/Personal/react-express-crud-generator/node_modules/mysql/lib/protocol/sequences/Query.js:79:18)
    at Protocol._parsePacket (/Users/simonedellefave/Personal/react-express-crud-generator/node_modules/mysql/lib/protocol/Protocol.js:291:23)
    at Parser._parsePacket (/Users/simonedellefave/Personal/react-express-crud-generator/node_modules/mysql/lib/protocol/Parser.js:433:10)
    at Parser.write (/Users/simonedellefave/Personal/react-express-crud-generator/node_modules/mysql/lib/protocol/Parser.js:43:10)
    at Protocol.write (/Users/simonedellefave/Personal/react-express-crud-generator/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/Users/simonedellefave/Personal/react-express-crud-generator/node_modules/mysql/lib/Connection.js:88:28)
    at Socket.<anonymous> (/Users/simonedellefave/Personal/react-express-crud-generator/node_modules/mysql/lib/Connection.js:526:10)
    at Socket.emit (events.js:400:28)
    at Socket.emit (domain.js:475:12)

I'm using a MySQL 5.5.62
What can i do?

@rijkvanzanten
Copy link
Collaborator

@simonedellefave-dev Generated columns where introduced in MySQL 5.7, which means the inspector doesn't currently support MySQL versions older than 5.7.

MySQL 5.5 came out 12 years ago (!!). I would highly recommend updating to a more modern version regardless of schema inspector support

@simone-frontdev
Copy link
Author

😄 Thank you very much! I'll upgrade to a modern version

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

2 participants