MariaDB : Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on clause' #7231

Closed
opened 2026-01-22 15:47:34 +01:00 by admin · 5 comments
Owner

Originally created by @jeremyrncp on GitHub (Oct 16, 2023).

Bug Report

MariaDB : Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on clause'

Q A
doctrine/ORM 2.16.2

Summary

When running bin/console doctrine:schema:validate, i have an error SQLSTATE[42S22]: Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on claus e'

Current behavior

How to reproduce

bin/console doctrine:schema:validate

Mapping
-------

                                                                                                                       
[OK] The mapping files are correct.                                                                                    
                                                                                                                       

Database
--------

[critical] Error thrown while running command "doctrine:schema:validate". Message: "An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on clause'"

In ExceptionConverter.php line 67:
                                                                                                                                    
 An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on claus  
 e'                                                                                                                                 
                                                                                                                                    

In Exception.php line 28:
                                                                                       
 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on clause'  
                                                                                       

In Statement.php line 130:
                                                                                       
 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on clause'  
                                                                                       
doctrine:schema:validate [--em EM] [--skip-mapping] [--skip-sync]

Expected behavior

Originally created by @jeremyrncp on GitHub (Oct 16, 2023). ### Bug Report MariaDB : Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on clause' | Q | A |------------ | ------ | doctrine/ORM | 2.16.2 #### Summary When running bin/console doctrine:schema:validate, i have an error SQLSTATE[42S22]: Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on claus e' #### Current behavior <!-- What is the current (buggy) behavior? --> #### How to reproduce ``` bin/console doctrine:schema:validate Mapping ------- [OK] The mapping files are correct. Database -------- [critical] Error thrown while running command "doctrine:schema:validate". Message: "An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on clause'" In ExceptionConverter.php line 67: An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on claus e' In Exception.php line 28: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on clause' In Statement.php line 130: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'x.TABLE_NAME' in 'on clause' doctrine:schema:validate [--em EM] [--skip-mapping] [--skip-sync] ``` #### Expected behavior <!-- What was the expected (correct) behavior? -->
admin closed this issue 2026-01-22 15:47:35 +01:00
Author
Owner

@jeremyrncp commented on GitHub (Oct 17, 2023):

Bug fixed with modify key serverVersion of DATABASE_URL in .env

@jeremyrncp commented on GitHub (Oct 17, 2023): Bug fixed with modify key serverVersion of DATABASE_URL in .env
Author
Owner

@NetworkDevHead commented on GitHub (Mar 18, 2024):

To elaborate on @jeremyrncp you can just completely remove the version .e.g ?serverVersion=mariadb-10.4.11 from the DATABASE_URL to solve

@NetworkDevHead commented on GitHub (Mar 18, 2024): To elaborate on @jeremyrncp you can just completely remove the version .e.g ?serverVersion=mariadb-10.4.11 from the DATABASE_URL to solve
Author
Owner

@ErickGabrielLira commented on GitHub (Jun 5, 2024):

Thank you all, friends!

@ErickGabrielLira commented on GitHub (Jun 5, 2024): Thank you all, friends!
Author
Owner

@kusman28 commented on GitHub (Sep 8, 2024):

To elaborate on @jeremyrncp you can just completely remove the version .e.g ?serverVersion=mariadb-10.4.11 from the DATABASE_URL to solve

This one works for me!

@kusman28 commented on GitHub (Sep 8, 2024): > To elaborate on @jeremyrncp you can just completely remove the version .e.g ?serverVersion=mariadb-10.4.11 from the DATABASE_URL to solve This one works for me!
Author
Owner

@mahmutaydin1 commented on GitHub (Jan 17, 2025):

To elaborate on @jeremyrncp you can just completely remove the version .e.g ?serverVersion=mariadb-10.4.11 from the DATABASE_URL to solve

thank you

@mahmutaydin1 commented on GitHub (Jan 17, 2025): > To elaborate on [@jeremyrncp](https://github.com/jeremyrncp) you can just completely remove the version .e.g ?serverVersion=mariadb-10.4.11 from the DATABASE_URL to solve thank you
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7231