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

Unknown column 'expression' in 'field list' #5091

Closed
5 tasks done
hooliy opened this issue Jan 9, 2024 · 5 comments
Closed
5 tasks done

Unknown column 'expression' in 'field list' #5091

hooliy opened this issue Jan 9, 2024 · 5 comments

Comments

@hooliy
Copy link

hooliy commented Jan 9, 2024

Describe the bug

yarn mikro-orm schema:fresh -r

Error: select table_name as table_name, nullif(table_schema, schema()) as schema_name, index_name as index_name, non_unique as non_unique, column_name as column_name, expression as expression
from information_schema.statistics where table_schema = database()
and table_name in ('book')
order by schema_name, table_name, index_name, seq_in_index - Unknown column 'expression' in 'field list'

Reproduction

no

What driver are you using?

@mikro-orm/mysql

MikroORM version

@mikro-orm/cli@6.0.1

Node.js version

v20.5.1

Operating system

No response

Validations

@B4nan
Copy link
Member

B4nan commented Jan 9, 2024

Sounds like you are using an old MySQL version, we test with MySQL 8 only. If you are using MySQL 5.7, you should upgrade, it already reached the end of life a few months ago.

@B4nan B4nan closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2024
@hooliy
Copy link
Author

hooliy commented Jan 9, 2024

Sounds like you are using an old MySQL version, we test with MySQL 8 only. If you are using MySQL 5.7, you should upgrade, it already reached the end of life a few months ago.

MySQL version: 8.0.2-dmr

@B4nan
Copy link
Member

B4nan commented Jan 9, 2024

Then try upgrading, not sure what dmr means, but based on mysql website, v8.0.2 is ~7 years old, so pretty dated as well.

https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-2.html

@B4nan
Copy link
Member

B4nan commented Jan 9, 2024

Looking at this, you will need MySQL v8.0.13 or newer (that version is also more than 5 years old btw).

edit: let's see how common this will be, we could make it conditional, just like we handle support for check constraints

@hooliy
Copy link
Author

hooliy commented Jan 10, 2024

Looking at this, you will need MySQL v8.0.13 or newer (that version is also more than 5 years old btw).

edit: let's see how common this will be, we could make it conditional, just like we handle support for check constraints

Thank you. After testing, there are no bugs in MySQL v8.0.13.

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