Closed tao996 closed 10 months ago
I am going to try and test this with your example. My guess on the:
the question is I don't know where the __construct( $name = '\000', $columns = NULL, $type = 'UNIQUE' ) come from
is when the table has to be created and the primary index is created.
@tao996 I used the code you provided as well as the environment. Unfortunately I cannot reproduce this.
The migration where the table is created: https://github.com/niden/cphalcon/blob/T16480-indexes-describe/tests/_data/fixtures/Migrations/EncodingMigration.php#L50
The test I run: https://github.com/niden/cphalcon/blob/T16480-indexes-describe/tests/database/Db/Adapter/Pdo/DescribeIndexesCest.php#L52
The only change I had to do in that branch was to upgrade the mysql version to 8.1 which is identical to the one you are using.
This is the run for the tests:
@niden thank you for your answer very much. I check my code, and find the error
$db = new Phalcon\Db\Adapter\Pdo\Mysql([
'host' => 'host.docker.internal',
'username' => 'demo',
'password' => '123456',
'dbname' => 'phalcon_demo',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'options' => [
\PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
// \PDO::ATTR_CASE => \PDO::CASE_LOWER, // this line cause the error
\PDO::ATTR_EMULATE_PREPARES => false,
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC
],
]);
@tao996 Great to hear. Closing this.
Describe the bug
when call the describeIndexes
\db()->describeIndexes('demo_article');
it print the below error
the question is I don't know where the
__construct( $name = '\000', $columns = NULL, $type = 'UNIQUE' )
come fromDetails
the docker desktop run in windows 11
Additions Information