Skip to content

Commit

Permalink
Make query in SchemaHashMysql independent from internal sorting (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Jul 30, 2023
1 parent 2b9b044 commit 812b436
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions src/DbSchema/SchemaHasherMysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,24 @@ public function hashDb(): string
SELECT
MD5(
GROUP_CONCAT(
CONCAT(
COALESCE(COLUMN_NAME, ""),
COALESCE(EXTRA, ""),
COLUMN_TYPE,
IS_NULLABLE
)
InnerSelect.columns
)
) AS dbsignature,
1 AS grouper
FROM
information_schema.columns
WHERE
table_schema = DATABASE()
FROM (
SELECT
CONCAT(
COALESCE(COLUMN_NAME, ""),
COALESCE(EXTRA, ""),
COLUMN_TYPE,
IS_NULLABLE
) as columns
FROM
information_schema.columns
WHERE
table_schema = DATABASE()
ORDER BY table_name, column_name
) as InnerSelect
GROUP BY
grouper';

Expand Down

0 comments on commit 812b436

Please sign in to comment.